|
From: jjay on 19 Jun 2008 21:56 I am using cfform for a CC payment form, and validating the CC number etc.. with the cfform "validate=credicard" paramater. This is all fine as usual. I have a toggle in my form to show or hide particular fields depending on a radio button selected (Pay CC or Bank Tfr). If the CC payment fields are hidden (user has selected to pay by Bank Tfr), I don't want the validation for those fields to run. If they select CC payment, the validation should run. Validation is onSubmit. I am trying to find a way of disabling or re-enabling the validation on given cfform fields. Have scoured the net, forums etc.. but just can't find anything. Does anyone know how this could be acheived? Many Thanks in advance.
From: GArlington on 20 Jun 2008 04:32 On Jun 20, 2:56 am, "jjay(a)aus" <webforumsu...(a)macromedia.com> wrote: > I am using cfform for a CC payment form, and validating the CC number etc.. > with the cfform "validate=credicard" paramater. This is all fine as usual. > > I have a toggle in my form to show or hide particular fields depending on a > radio button selected (Pay CC or Bank Tfr). If the CC payment fields are > hidden (user has selected to pay by Bank Tfr), I don't want the validation for > those fields to run. If they select CC payment, the validation should run. > Validation is onSubmit. > > I am trying to find a way of disabling or re-enabling the validation on given > cfform fields. Have scoured the net, forums etc.. but just can't find anything. > > Does anyone know how this could be acheived? > > Many Thanks in advance. Usually if you disable the field (disable AND hide it) then noting will run over them, no javascript (client side validation), no server side script...
From: AbhiFusion on 26 Jun 2008 07:05 You can actually validate the fields rather than using the onSubmit of cfform. E.g:- Use the validate parameter in the cfinput
From: jjay on 26 Jun 2008 07:20 Hi AbhiFusion, thanks for your suggestion, but I don't know if I am sure I understand what you are suggesting. Could you elaborate? Thanks
From: AbhiFusion on 26 Jun 2008 07:26 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 <cfinput type="Text" validate="creditcard" name="creditCard">
|
Next
|
Last
Pages: 1 2 Prev: CFImage problem Next: nullpointer exception after page sits for a minuteor two |