- April 12, 2018 at 4:54 am #24963
I have a field that is only mandatory if a specific checkbox has been checked.
This field is always visible and should remain so; therefore a conditional logic using show/hide field will not suit.
The user can fill this field in optionally (ie not required) in most situations BUT if they select a specific checkbox this field becomes mandatory.
Is there a way to programatically toggle or set the ‘required’ state for fields for submit form validation?
I need to do this in client-side JS.April 16, 2018 at 1:45 am #25003
I see you add a ‘required’ CSS class to fields and don’t use ‘REQUIRED’ parameter on form fields.
If I set the field as required in the settings and set it up as if it is always expected (ie set validators and error message text)
Then programatically remove the ‘required’ class… when it is not mandatory…
Will QuForm ‘On submit’ ignore the required settings and allow the form to go?
If so I have a solution I could use.
Please advise if above would work.. or provide a solution if possible.April 16, 2018 at 12:43 pm #25006
You must be logged in to reply to this topic.
- 2minds on Unable to submit Form: Ajax Error34 minutes ago
- movisart on Help needed…6 hours, 42 minutes ago
- cicolino on Datepicker – prevent closing on page scrolling ?13 hours, 2 minutes ago
- Harrison on Floating Placeholders13 hours, 55 minutes ago
- Harrison on Floating Placeholders14 hours, 22 minutes ago
- Ally on Media uploads not showing in media browser15 hours, 15 minutes ago
- Ally on Min and Max lines in text area element15 hours, 25 minutes ago
- Ally on How to only disable the days on calendar not hide?16 hours, 9 minutes ago
- Ally on Accidentially Submitting the form with Enter Key (disable enter Key)16 hours, 38 minutes ago
- Ally on Floating Placeholders17 hours, 11 minutes ago
- Min and Max lines in text area element by smekdigital15 hours, 25 minutes ago
- How to only disable the days on calendar not hide? by movisart16 hours, 9 minutes ago
- Floating Placeholders by Harrison13 hours, 55 minutes ago
- Bug with adding custom css styles? by Hiyou18 hours, 25 minutes ago
- Add custom JS by noudard18 hours, 28 minutes ago
- Adding Form to wordpress admin by mijoe18 hours, 28 minutes ago
- Datepicker – prevent closing on page scrolling ? by cicolino13 hours, 2 minutes ago
- Validate if name exist by Icemanmx2 days, 9 hours ago
- Documentation or info on match criteria for fields by katw19 hours, 53 minutes ago
- Locate several pages of form on a different wp page by email@example.com days, 13 hours ago