Goku
|
Posted: 04/04/2004, 12:39 PM |
|
Good day!
I would like to ask if it is possible and how to make one or more TextBoxes in a record form required, but that requirement is conditioed by one CheckBox in same record form. So, if that CheckBox is checked, next two TextBoxes are required, if not checked TextBoxes are not required... If it si possible please tell me how to do that.
Thnx
Andrej
|
|
|
srinivas
Posts: 54
|
Posted: 04/04/2004, 1:05 PM |
|
You can do this couple of ways.
The most direct and simple way might be to use an event such as on validate and do your own checking and writing errors back to the form if needed.
The second approach, that I used in cases such as these, is to write a code/regular expression validation on the form control you are trying to enforce a condition. You can get pretty clever and put complex expressions in there and every thing would work just fine.
Hope that would help.
-Srinivas
|
|
|
peterr
Posts: 5971
|
Posted: 04/04/2004, 2:12 PM |
|
You could also do this with JavaScript by finding various examples on the net ( http://www.google.com/search?q=javascript+checkbox+required+validation ) and then modifying them to work as you need. You may even be able to find an example for your exact scenario - just spend some time reading. Here is another search that may help: http://www.google.com/search?q=javascript+field+required+checkbox+checked
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
|