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.
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.
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
Yes, you can try to replace these files, but we recommend you to send us your for.js files on support@dhtmlx.com - we will add a fix in your files ans send you back.