Tell us what you are trying to do?
I created some CPTs and custom fields. I did this in the back end using the classic view. This allowed me to do some custom css/js.
One of the custom fields is a checkbox. In my view, I used html/css to turn the checkbox into a toggle for the UI.
I want to have the toggle change event make the change to the checkbox in WP and record the check/uncheck to the database.
I figured I could use Toolset forms to accomplish this, but I cannot see how to build the form using the classic view and did not find any documentation.
Is this possible with toolset forms? Can I do this or do I need to go down the custom code route?
Is there any documentation that you are following?
N/A
Hello. Thank you for contacting the Toolset support.
Toolset Views and Toolset Forms are two different entities.
You can use views to build the custom search where you add the custom search filters (custom fields, taxonomies) to filter the view results - that you already did. The custom search filters belongs to view. That you can change the filters to filter the view results.
Toolset Forms are used to create/update the post items or create/update user profiles. In your case it should be post form but as I shared post forms are used to create/update post items and what you want is to record the custom search filter checked/unchecked actions. There is no such feature available. Even if you try to hook-in the Toolset form, toolset form will create new post with every action and that is no the feasible solution.
I suggest you may rethink how you want to implement this feature with your site or you are welcome to contact any of our certified partners:
- https://toolset.com/contractors/
Add this form to your view's loop so the form will be available to edit single post of loop item having said that if you have ten post then you will have ten edit forms. If you do not want to add form within the view's loop then you can also add the post edit link:
I figured out how to add a form in the classic view builder. I would like some direction on how to build my form. This app is going to be a simple check in and check out form. In the loop, I would like a simple toggle button that the user can tap to switch between in and out. This is tied to a check box on the CPT. Is it possible to use forms to have a simple toggle and no submit button, but have it submit upon toggle change event?
Toolset offers a Ajax submission. So you should try to add submit button also on your form and hide that button and try to trigger the click event for that form submit button on change event of your checkbox/radio button.