[eluser]Unknown[/eluser]
Hi
I have a form that unhides a field when a certain value is chosen in a select menu. If this value is chosen the field needs to be required.
However if I make the field required in the validation rules it won't submit the form if the value isn't chosen out of the select menu. How can I manipulate the validation rules so it will only set that field to be required if a certain value for another field is posted?
I tried this:
Code:
if($_POST['hearabout']=='The Investors Club') {
$fields['supportMember'] = "required";
}else{
$fields['supportMember'] = "callback_nothing";
}
But it doesn't set the field as 'Required' when the post value is set to 'The Investors Club'.
Any help would be greatly appreciated