Question
Conditional Form Validation
I am using ASP/VB.
I have a list/menu with options that populate via a DB table. For this
example let's keep it simple and use:
<option value="1">Red</option>
<option value="2">Blue</option>
<option value="3">Black</option>
<option value="4">Green</option>
I also have a FileField that lets them select a file to upload.
What I need to do is make the FileField required if they select certain
values (lets say red and black) from the list/menu, and not required for all
other values.I also messed around with passing the value of the list/menu
populating
a hidden textfield on "onchange" but I still can't figure out how to make
the
Filefield required depending on the value of the hidden textfield.
Not sure how to do this, any help would be greatly appreciated.
Thanks!
I have a list/menu with options that populate via a DB table. For this
example let's keep it simple and use:
<option value="1">Red</option>
<option value="2">Blue</option>
<option value="3">Black</option>
<option value="4">Green</option>
I also have a FileField that lets them select a file to upload.
What I need to do is make the FileField required if they select certain
values (lets say red and black) from the list/menu, and not required for all
other values.I also messed around with passing the value of the list/menu
populating
a hidden textfield on "onchange" but I still can't figure out how to make
the
Filefield required depending on the value of the hidden textfield.
Not sure how to do this, any help would be greatly appreciated.
Thanks!
