I'm using a custom search where I have a dropdown:
<select name='Time_Available'>
<option value="" selected='true'>Any</option>
<option value='<?php echo date('Y/m/d', strtotime('+30 days')) ?>'>30 days</option>
<option value='<?php echo date('Y/m/d', strtotime('+60 days')) ?>'>60 days</option>
<option value='<?php echo date('Y/m/d', strtotime('+90 days')) ?>'>90 days</option>
</select>
Although, when the form is submitted, if the "Any" option is selected, I would like it to add this to the form:
<input type='hidden' name='Model' value='Yes' />
For the rest of the options (30, 60, 90 days) I just want it to submit regularly without the above part.
I was trying to work around this by adding &Model=Yes
to the value of "Any" although the ampersand gets screwed up. Is there any javascript or jQuery I can add to resolve this?