Forums

Validation on toggle hidden fields

sem 23 Oct, 2020
Doesn't appear to work - got two multi fields with two buttons with action to show the relevant multi field group. Works fine with no validation. Set one field to required as a test, added "Toggle fields validation enabled" on the show toggled event for the multi field. But if that multi field isn't selected, the form won't submit because the test field is still required.

mark
Max_admin 23 Oct, 2020
please create a test form with that part only and upload it here or post a link for it so I can test it, you may also send a link using the contact page!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sem 23 Oct, 2020
thanks Max. Will upload a test form ASAP.
sem 23 Oct, 2020
Here you go max -

I set the Leave Date as required. That should only be required if someone is submitting a new user form. I'm sure it's a simple mistake on my part but I'm going round in circles trying things.

​[file=13410]ToggleRequiredTest_23_Oct_2020_16_19_30.cf7bak[/file]
Max_admin 25 Oct, 2020
ok, the problem here is that, the toggle validation event does not work correctly on areas, this has been fixed for the next update, 2nd, your "Leave date" field does not have a Disabled validation setting by default!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sem 25 Oct, 2020
hey Max. That was the last version of field settings I tried. I assumed the toggle would turn off validation if the field was hidden. So toggle its default state.

when‘s the next update due?

mark
Max_admin 25 Oct, 2020
Hi Mark,

The new update is out, please test it and let me know!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sem 25 Oct, 2020
perfect. Will do in the morning. Any thoughts on the repeater area question for fields with no database connection? The post “explanation of repeater area” I replied to.

thanks, mark
sem 26 Oct, 2020
Answer
1 Likes
Perfect Max! It works as expected.

To make a field in a hidden element required if enabled:
Select "Disabled (Keep Validation rules in disabled mode)" and "Required" for the field, "Toggle Shown" and "Toggle fields validation enabled" for the action.

Thanks, mark
You need to login to be able to post a reply.