/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Issue with Radios

I am creating a scheduling system. I am having an issue with my radios, the user is able to select multiple radios when I only want them selecting one. I saw [URL=”http://w3schools.com/html/html_forms.asp”]here[/URL] that my code is the same, and it should be working. Any ideas?

My code:

[code=html]
<form action=”schedule_form2.php” method=”post”>
<table width=”150px”>
<tr>
<td>
Scheduling System Form
</td>
</tr>
<tr>
<td>
&nbsp;
</td>
</tr>
<tr>
<td>
Employees<br> (Check one, click Continue)
</td>
<td>
&nbsp;
</td>
</tr>
<tr>
<td id=”emp”>
GREG </td>
<td>
<input type=”radio” name=”emp1″ value=”GREG” />
</td>
</tr>
<tr>
<td id=”emp”>
TASHI </td>
<td>
<input type=”radio” name=”emp2″ value=”TASHI” />
</td>
</tr>
<tr>
<td id=”emp”>
TSERING </td>
<td>
<input type=”radio” name=”emp3″ value=”TSERING” />
</td>
</tr>
<tr>
<td id=”emp”>
ALAN </td>
<td>
<input type=”radio” name=”emp4″ value=”ALAN” />
</td>
</tr>
<tr>
<td id=”emp”>
JEFF </td>
<td>
<input type=”radio” name=”emp5″ value=”JEFF” />
</td>
</tr>
<tr>
<td id=”emp”>
BRIAN </td>
<td>
<input type=”radio” name=”emp6″ value=”BRIAN” />
</td>
</tr>
<tr>
<td>
<input type=”submit” value=”Continue” name=”submit” />
</td>
</tr>
</table>
</form>
[/code]

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@Mr__E__CrypticJul 02.2008 — the 'name' for each radio should be the same.

incidently, the id tags should be unique and <br> should be <br />
Copy linkTweet thisAlerts:
@Mr__E__CrypticJul 02.2008 — in case that didn't make sense, something like this:

[code=html]<form action="schedule_form2.php" method="post">
<table width="150px">
<tr>
<td>
Scheduling System Form
</td>
</tr>
<tr>
<td>
&nbsp;
</td>
</tr>
<tr>
<td>
Employees<br /> (Check one, click Continue)
</td>
<td>
&nbsp;
</td>
</tr>
<tr>
<td id="greg">
GREG </td>
<td>
<input type="radio" name="emp1" value="GREG" />
</td>
</tr>
<tr>
<td id="tashi">
TASHI </td>
<td>
<input type="radio" name="emp1" value="TASHI" />
</td>
</tr>
<tr>
<td id="tsering">
TSERING </td>
<td>
<input type="radio" name="emp1" value="TSERING" />
</td>
</tr>
<tr>
<td id="alex">
ALEX </td>
<td>
<input type="radio" name="emp1" value="ALEX" />
</td>
</tr>
<tr>
<td id="alan">
ALAN </td>
<td>
<input type="radio" name="emp1" value="ALAN" />
</td>
</tr>
<tr>
<td id="jeff">
JEFF </td>
<td>
<input type="radio" name="emp1" value="JEFF" />
</td>
</tr>
<tr>
<td id="brian">
BRIAN </td>
<td>
<input type="radio" name="emp1" value="BRIAN" />
</td>
</tr>
<tr>
<td>
<input type="submit" value="Continue" name="submit" />
</td>
</tr>
</table>
</form>[/code]
Copy linkTweet thisAlerts:
@Design-is-BSauthorJul 02.2008 — I changed my code to simplify it:

[code=html]
<form action="schedule_form2.php" method="post">
<h3>Scheduling System Form</h3>
<h4>Employees (Check one, click Continue)</h4>
<input id=" type="radio" name="emp1" value="GREG" />&nbsp;&nbsp;&nbsp;<span>GREG</span><br>
<input type="radio" name="emp2" value="TASHI" />&nbsp;&nbsp;&nbsp;<span>TASHI</span><br>
<input type="radio" name="emp3" value="TSERING" />&nbsp;&nbsp;&nbsp;<span>TSERING</span><br>
<input type="radio" name="emp4" value="ALAN" />&nbsp;&nbsp;&nbsp;<span>ALAN</span><br>
<input type="radio" name="emp5" value="JEFF" />&nbsp;&nbsp;&nbsp;<span>JEFF</span><br>
<input type="radio" name="emp6" value="BRIAN" />&nbsp;&nbsp;&nbsp;<span>BRIAN</span><br>
<input type="submit" value="Continue" name="submit" />&nbsp;&nbsp;<INPUT TYPE="reset" VALUE="Reset">
</form>
[/code]


I took away the table. So I still need to apply ids?
Copy linkTweet thisAlerts:
@Design-is-BSauthorJul 02.2008 — Nevermind, got it to work. Thanks Cryptic.
×

Success!

Help @Design-is-BS 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 5.7,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...