if a drop-down item is selected, 2 more fields required
Posted: Thu Jun 27, 2002 11:42 am
I have a drop down menu, and if one of the fields in that drop down is selected, I want to require 2 other fields to be filled in. If that specific item in the drop down menu is not selected, I do not want the other 2 fields to be required.
I'm not 100% sure how to set this up, so here is what I have:
configuration angle is the name of the drop down, and plastic disposable is the value of the specific item that will require 2 more fields to be checked in. I just want to make sure I did this correct.
I'm not 100% sure how to set this up, so here is what I have:
Code: Select all
if ($configuration angle == plastic_disposable) {
if (strln($disposable_yearly_usage) <=0) {
$error .="You must enter the yearly usage if you are using a Disposable Prophy Angle.<br>";
}
if (strln($disposable_angle_brand) <=0) {
$error .="You must enter the Disposable Angle Brand if you are using a Disposable Prophy Angle.<br>";
}
}configuration angle is the name of the drop down, and plastic disposable is the value of the specific item that will require 2 more fields to be checked in. I just want to make sure I did this correct.