Skip Navigation

[Resolved] Saving form on clicking checkbox

This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by leeL 4 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#1890177

I have created a view that lists/loops through all the posts of newly created custom post type I created.

I then created an edit form so I can edit the custom fields for the new custom post type. I added the form in the view so that the form appears multiple times, each time per list item in the view. On of the custom fields is a checkbox and I would like the form to save when the checkbox changes (checked or unchecked), currently I am have to check or uncheck the box and then select the submit button to save the changes. Is it possible to save when I check or uncheck the checkbox? I have already selected the option "Submit this form without reloading the page (use AJAX)" when I created the form, however because I have placed the form within a view it doesn't seem to work.

Kind regards
Lee

#1890661

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I understand, you want to submit the form when checkbox field is checked or unchecked instead of having a submit button - is that correct? If yes:
- There is no native way to do that but you may try to add some custom JS code and try to submit the form on the checkbox checked/unchecked and see if that help you to resolve your issue.

If you can share problem URL and access details, I would check if I can offer you any solution otherwise you will require to contact the Javascript pro.

#1890719

Hi Minesh, thank you for your response. Your understanding of my problem was current and thanks for confirming that there was not a native way to resolve and js code would be required. I have managed to resolve the problem. Kind regards Lee