Buy Now
Sign in

Validation seems not to work with Events

monochrome , December 10 2019, 12:29
M
monochrome 25
December 10 2019, 12:29 #390291
Hi,
i´m not 100% sure if this is a bug or i configured something wrong.
I added a checkbox with an enable/disable validation event on the following textbox.
checkbox.jpg
( i tried name AND Id from the textfield as slector .. maybe here is something wrong from my side?) The textbox is configured as required but initially disabled.
textbox.jpg
On the actions tab i put an validate fields into the submit area to check it after submission.
When i test the form and click the checkbox and press submit (without filling the textfield) the Error message shortly appers under the textfield ( untill the next page is loaded) and the form redirects to the submit page.
I exspected to stay on the form page with the error message under the textfield.
Did i configure something wrong?
I added the full test-form here:
The problems sounds similar to this older forum post but didnt solve my problem.
(https://www.chronoengine.com/forums/posts/t103450/events-and-validation-combination-not-working-properly-in-cf-v6)
Dont hesitate to ask if you need further information!

Thanks for your help,
Thorsten
healyhatman 8
December 11 2019, 02:46 #390304
That's right it doesn't work with conditionally validated fields.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
M
monochrome 25
December 11 2019, 11:01 #390314
Hi healyhatman,
thanks for your answer.
Do you mean this is an exspected behavior or did confirm it as a bug?
Do you know any workaround to enable the validation of fields for that problem?
Thanks in advance,
Thorsten
healyhatman 8
December 11 2019, 11:25 #390315
You can either
1) exclude the conditional fields from validation, and use a series of event switches to run the remaining validations only if they're supposed to be run.
2) Validate it yourself manually with PHP
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store