PDA

View Full Version : Validate Me! (Yes, I am a disabled form element)


alindsay55661
04-20-2007, 10:12 PM
Jack,

When creating a complex form that includes dependencies I have noticed that validation occurs on disabled elements. Is there anyway to override this?

I have multiple selects with "Other" options which trigger "required" "Other" text fields. These fields are only required in the event the "Other" option is selected yet when I call form.submit() it fails and causes the "Other" text fields to show their errortips, even though they are disabled elements and shouldn't post with the form in the first place.

Is this intentional or should this be fixed? Thanks in advance.

alindsay55661
04-20-2007, 10:16 PM
By the way, when using form.getValues() no disabled form elements are returned so it seems that the above mentioned problem is a bug. In fact form.submit() never reaches the post but hangs on validation. Again, this seems to occur with disabled text fields that are required.

jack.slocum
04-21-2007, 07:33 AM
Definitely a bug. It should be fixed in svn.

alindsay55661
04-23-2007, 11:46 AM
Awesome thanks!

thebashi
07-03-2007, 04:10 AM
well i have this second problem,
i have a form which has a disabled field, when i use "getValues()", it doesnt give me disabled fields value. i load data with "setValues(myRecord.data)" method.
what might be the problem, is this the same issue which jack has mentioned. cause i tried 1.1-beta1 and it didnt solve my problem...