Hi everybody!
I’m trying to do something in my web site, but first I need to know if I can do this. I explain my scenario
1. I have a form with a Tab area and other fields. The tab area has 2 tabs
2. In the second tab there are some fields and a button to save ONLY these fields. This is not a submit button, it will save the record (just the fields in tab 2) through AJAX.
3. Some of the fields, in the tab, are defined as required or they have other validation rules (alpha, digit, phone etc). I configured these validations in the validations tab of each field (in CF designer) . When I run the form, and I test the fields, everything is fine with the validations, the popup messages are shown.
4. The button has an on-click event with some other validations in JS.
Here is my question
I know that when a form is submitted, it is validated by the validation routine and the submission is stopped if some field is invalid. But in this case, my button is not a submit button, How can I know which fields are invalid, when click the button? How can I call, in my click event, the CF validation routine for each field in order to receive a true or false value, according to the rules defined?
Thanks in advance
Hugo
I’m trying to do something in my web site, but first I need to know if I can do this. I explain my scenario
1. I have a form with a Tab area and other fields. The tab area has 2 tabs
2. In the second tab there are some fields and a button to save ONLY these fields. This is not a submit button, it will save the record (just the fields in tab 2) through AJAX.
3. Some of the fields, in the tab, are defined as required or they have other validation rules (alpha, digit, phone etc). I configured these validations in the validations tab of each field (in CF designer) . When I run the form, and I test the fields, everything is fine with the validations, the popup messages are shown.
4. The button has an on-click event with some other validations in JS.
Here is my question
I know that when a form is submitted, it is validated by the validation routine and the submission is stopped if some field is invalid. But in this case, my button is not a submit button, How can I know which fields are invalid, when click the button? How can I call, in my click event, the CF validation routine for each field in order to receive a true or false value, according to the rules defined?
Thanks in advance
Hugo