For eg I have this code.
Select one of your preferred contact methods:
<p><br>
<select name="contactmethod">
<option value="phonenohome">Home No</option>
<option value="phonenowork">Work No</option>
<option value="mobileno">Mobile No</option>
</select>
<input type="text" name="">
What I want to do here is to when one of the dropdownlist value is selected for eg “mobileno”, I want this “mobileno” value to be transferred as a textfield’s name attribute (as shown at the bottom of the code). Does that make sense?
I thought a simple Javascript or PHP code might do just the trick. I’m not so sure this can be done. What do you think?
Using javascript jQuery framework, assuming input has a
idascontact_type