iam trying to validate a field which is created dynamically in chronoforms,
i have checked this link - http://www.chronoengine.com/forums/posts/f2/t88582/validation-for-dynamic-fields.html?hilit=validation+for+dynamic+fields
but following link is not working
http://www.chronoengine.com/forums.html?cont=posts&p=298661#p298661
can you advise us how to go forward
Hi Bob,
We've tried following the example given, but somehow the validation seems to fail.
In our case, the form's name is NewForm3
and the dynamically added input has the id : FirstName
and we used the syntax :
formCheck_NewForm3.register($('FirstName'));
We seem to have followed the example code correctly, but still the submit button doesnt trigger the validation on the FirstName field.
Any suggestions ?
Thanks in advance
Hi csdpl,
Please post a link to the form so I can take a quick look.
Bob
Hi bob,
Not sure if there is some issue with the forums, but all the forum post dates have changed. Please help 😀
Sorry, my bad. I got confused for a moment. Please help with this example.
Hi csdpl,
Adding classes after the page is loaded won't add a validation in CFv4. The FormCheck library used there reads the classes when the page loads.
You need to use the formCheck.register() and formCheck.dispose() methods that are used in the post I linked to.
Bob
OK bob,
Thanks a lot. will try and if it doesnt work, we will give you the link so you can access the code. Really appreciate your help.
Thanks a million bob! It worked this time around. We didnt realize that we were passing in a reference to a div instead of the actual input tag itself. Works like a charm now.