Set text based on Form <select> value
- by danit
I have the following <select> in a form:
<select style="width: 100px; text-align: center;">
<option value="email">Email</option>
<option value="telephone">Phone</option>
</select>
The default option is Email so the following <input> is show:
<p class="email_form">Please supply your Email Address</p>
<input onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;" style="width: 270px" type="email" name="email" id="email" value="[email protected]">
However if they choose telephone I want to change the above to ask for a telephone number?