I have 3 email fields and 3 checkboxes associated with them. If a checkbox is ticked then the corresponding email field cannot be blank. I want to create a single validation function called ‘CheckEmails’ that is called from the checkboxes via validate:‘CheckEmails’.
How can I find out which of the 3 checkboxes the validation is being called from so that I can check the associated email field?
Otherwise I have duplicate redundant code because I have to create 3 nearly identical validation functions. One per checkbox.
Please can you advise.
Could you please provide us completed demo on firstname.lastname@example.org - we will try to suggest you something according to the logic of your app.
docs.dhtmlx.com/doku.php?id=othe … leted_demo
And add a link to this topic in that letter, please
My problem would be solved if when calling the validation function the fieldname was passed along with the value of the field. That is the change that is required here.
Go to this link and download fixed form files in attachments - they must help you to solve your issue.
Thanks for your quick response. I can’t see a link on your post. Please can you check for me.
Sorry, something happened…
I’m currently on ver 3.0 of the full pro suite. I know the most recent version is 3.6 so I’m concerned whether there will be some compatibility issues if I use the files in your link.
Please can you advise whether it is safe to use these files with ver 3.0
Thanks again for your help.
Yes, you can try to replace these files, but we recommend you to send us your for.js files on email@example.com - we will add a fix in your files ans send you back.
Check your mail - we’ve send you updated files.
It’s been about an hour since you posted the last message. However your email hasn’t arrived.
Please can you check at your end.
Tried again - please check )