Hello @justinsmith19
In this case, you should separate the choices in different fields, one per field, and then configure the fields as required.
Best regards.
Hi @codepeople,
I would need to show an error message or unsuccessful message when the user fills in the incorrect field. How would I do this?
Please advise
Thanks
Hello @justinsmith19
I’m sorry, but I would need additional details.
If a field is configured as required and you try to submit the form, the plugin displays an error message for the required field.
Best regards.
-
This reply was modified 4 years, 11 months ago by
codepeople.
Hi @codepeople,
My apologies, perhaps I’m not explaining this correctly.
For example, in the form, there is the following question: Do you own any assets?
The checkbox options are “Yes” and “No”.
If the user selects “Yes”, then they can successfully continue their form and click Submit, and their form will be sent.
However, if the user selects “No”, then when they click Submit, an error message will show and their form will not be sent.
Let me know if this makes sense and whether it can be achieved.
Thanks
Hello @justinsmith19
The preferred solution, in this case, would be to configure the submit button as dependent on the “Yes” choice in the checkbox field, and an “Instruct. Text” field with the error message as dependent on the “No” choice.
If you want to configure the submit button as a dependent field, you must emulate the submit button with a button field:
1. Select the “no” option for the “Display submit button?” attribute in the form’s settings.
2. Insert a button field in the form with the following piece of code as its onclick event:
jQuery(this.form).submit();
3. Finally, configure this field as dependent on the “Yes” choice in the checkbox field.
More information about dependencies by reading the following post in the plugin’s blog:
https://cff.dwbooster.com/blog/2020/03/01/dependencies/
Best regards.
Hi @codepeople,
This almost works.
I have multiple questions, whereas all answers need to be “Yes” in order for the button to show.
How do I make the button dependant on all those fields?
Thanks
Hello @justinsmith19
You can insert a calculated field as an auxiliary, and configure the button as dependent on the equation’s result.
Best regards.
Thanks so much @codepeople.
Y’all are awesome!