/    Sign up×
Community /Pin to ProfileBookmark

drop down field that also allows input

is there a way to allow a user to either input a text value or select from a drop down and the results gets stored in the form field. for example below: the list of valid values are small, medium or large but my user wants to enter ‘extralarge’ and i want to allow it into my field.

in other words combining the functionality of:
<INPUT TYPE=TEXT NAME=”sizepizza”> and
<SELECT NAME=”sizepizza”>
<OPTION VALUE=”s”>small
<OPTION VALUE=”m”>medium
<OPTION VALUE=”l”>large
</SELECT>

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceJan 27.2005 — The HTML method:
<i>
</i>Size: &lt;SELECT NAME="sizepizza"&gt;
&lt;OPTION VALUE="s"&gt;small
&lt;OPTION VALUE="m"&gt;medium
&lt;OPTION VALUE="l"&gt;large
&lt;/SELECT&gt;
Other: &lt;INPUT TYPE=TEXT NAME="sizeother"&gt;

Otherwise, without a trip to the server, JavaScript is required.
Copy linkTweet thisAlerts:
@ButtersJan 27.2005 — You can also do that in Visual Basic and export to HTML.
×

Success!

Help @michelled spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...