This content has been marked as final. Show 6 replies
You can actually validate the fields rather than using the onSubmit of cfform.
E.g:- Use the validate parameter in the cfinput
Hi AbhiFusion, thanks for your suggestion, but I don't know if I am sure I understand what you are suggesting. Could you elaborate?
Just for example:-
You must be using a text field so that user can enter the credit card number. And this is what you want to validate. In this case use following code
That's exactly what I am doing.
My question though is how can I turn this validation OFF. I am validating the field, but if the user selects to pay by an option other than Credit Card, I need to be able to 'turn off' the validation process so that I can submit the form with this field empty.
A porr mans way to fix it would be to have you radio button onClick event set the value of the CC field to "0" the same time you hide or disable the field and set it to "" when you make it visible or enable the field.
"0" passes the Adobe CC check.