Hello,
This is going to be a bit tricky and thats why i will be explaining in as much detail as possible, so thank you in advance for taking the time to read.
I have a form with all kinds of fields that are hiding and showing up depending on values of other fields. lets say my form consists of the following:
EnableAge (a checkbox)
Age (a text field)
EnableDate (a checkbox)
Date (a date field)
If we place a numeric validation on the Age field, if the user had that field hidden, the validation rule will be ignored, which is great, and if the field is enabled the validation rule triggers and checks for numerics (and not null) in that field, perfect.
Now the problem comes when we deal with the date field. This field does not take any kind of validations, all it takes is the \"Required\", my problem is, if this field is disabled/hidden, and the user submits, the form would not submit because that hidden/disabled field is set to \"REQUIRED\"! Which is a wrong behaviour!
How can i do one of these two:
1. Set the required on and off dynamically from the client side, using a javascript or something.
2. Set the validations rules on a date field, since if i remove the required from this field, and place a validation rule of for example \"numeric\" things will work perfectly.
This is very important, thank you in advance for helping

<br><br>Post edited by: adel.ammari, at: 2008/06/02 15:04