/    Sign up×
Community /Pin to ProfileBookmark

Problem getting inch and feet characters from form values

I’m creating a form where basketball coaches can enter their teams roster and then that gets sent to a database which then appears on the rosters page of the site.

My problem is where they select the players height. I don’t want them to enter it as text manually as I want this to be consistent across all rosters, example: 6′ 3″

So I decided to give them a drop down menu to select the height. I go from 4′ 0″ all the way up to 7′ 3″.

But I’m pretty sure I can’t use this:

<select name=”height” >
<option value=”4′ 8″”>4′ 8″</option>

Not sure how to get the foot character and inch character to appear correctly in the results.

Thanks for any help
Steve

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@Grandpa__quot_D_quot_Nov 30.2012 — Inches will be: &#34;

Feet will be: &#39,

Hope this helps! Best to you!
Copy linkTweet thisAlerts:
@rtretheweyDec 01.2012 — You need to escape (encode) the quotation mark in the <option> tag so that the browser knows that you mean to include it in the value and not the end of it. Just precede the quotation mark with a backslash, as in:
<i>
</i>&lt;option value="4' 8""&gt;4' 8"&lt;/option&gt;
Copy linkTweet thisAlerts:
@smk17authorDec 01.2012 — Thanks very much guys, got it to work!
×

Success!

Help @smk17 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.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

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