I am using a select tag to show Countries in a form.
I'd like the field to display the country code and only be the two characters wide. However, when the user selects the dropdown, I'd like the field to expand to display the actual country name.
This is what I have so far but seems I can't have my cake and eat it too.
I'd like the field to display the country code and only be the two characters wide. However, when the user selects the dropdown, I'd like the field to expand to display the actual country name.
This is what I have so far but seems I can't have my cake and eat it too.
Code:
<select name="country" tabindex="6" style="width:50">
<optgroup label="Select a country">
<cfoutput query="getcountries">
<option value="#id#">#countryname#</option>
</cfoutput>
</optgroup>
</select>