Click to See Complete Forum and Search --> : Form Problems
ZPFounder
02-23-2005, 05:43 PM
I'm trying to make a form for people to fill out when they want to join my RPG site, but I can't get the radio buttons to work! For some reason, when I click the buttons, I can either select them all, or they can't be selected. I can't get them to just select one, and that's what radio buttons are supposed to do, right? I just know I have an error somewhere in there... Here's the code:
<form method="post" action="mailto:BladeCyberstrike@lycos.com">
<fieldset>
<legend><font color="slategray">Character Information</font></legend>
<!-- Character name field -->
<label for="charname">Character Name: </label>
<input type="text" name="charname" id="charname">
<br>
<!-- Character age field -->
<label for="charage">Character Age: </label>
<input type="text" name="charage" id="charage">
<br>
<!-- character gender field -->
<label for="chargen">Character Gender: </lable>
<input type="radio" name="genderm" id="chargen" value="Male"> Male
<input type="radio" name="genderf" id="chargen" value="Female"> Female
</fieldset>
</form>
ZPFounder
02-23-2005, 06:16 PM
Anybody?
PSLoh
02-23-2005, 07:22 PM
the name of both radio buttons must be the same...
PeOfEo
02-23-2005, 08:45 PM
I also suggest not using a form with a mailto action because it is going to fail when a user does not have a mail client. This means that a lot of your webmail users can't use your form.
ZPFounder
02-24-2005, 08:01 AM
The buttons don't have the same name... So, what should I do other than a mailto form? Though, my site requires e-mail to join anyway... I'm still new to this whole thing.
...as PSLoh has stated...
the radio button group needs the same name to function correctly...
<input type="radio" name="gender" id="chargen" value="Male"> Male
<input type="radio" name="gender" id="chargen" value="Female"> Female
ZPFounder
02-24-2005, 08:45 PM
Okay, thanks! What other types of forms, other than e-mail, are there?
spufi
02-25-2005, 05:09 PM
Originally posted by ZPFounder
Okay, thanks! What other types of forms, other than e-mail, are there?
You use a server side technology like cgi, PHP, ASP, etc...
PeOfEo
02-25-2005, 10:22 PM
Originally posted by spufi
You use a server side technology like cgi, PHP, ASP, etc... Yes if you set the form action to a server side script
action="somescript.asp" or whatever kind of script it is, the script will grab the form inputs and do what you want with them. If you get the server side language to send the mail it will connect to an smtp (mail sending) server and send the mail like that, this way the user's mail client does not have to touch it. It will be accessible to everyone. It will also mean you are not vulnerable to spammers.
ZPFounder
02-26-2005, 08:46 PM
Originally posted by PeOfEo
Yes if you set the form action to a server side script
action="somescript.asp" or whatever kind of script it is, the script will grab the form inputs and do what you want with them. If you get the server side language to send the mail it will connect to an smtp (mail sending) server and send the mail like that, this way the user's mail client does not have to touch it. It will be accessible to everyone. It will also mean you are not vulnerable to spammers.
Okaaaaaayyy... Sorry, ummm... Can you say that in simpler terms? What's a script? I'm still rather new to this, and all I really know is some basic HTML.
the tree
02-27-2005, 02:45 AM
A script is a set of things to do, it's done in scripting languages, you've probably heard of javascript which is a language that gives browsers something to do.
Server scripting languages like ASP, PHP or JSP are sets of things to do for the webserver, such as processing forms or putting lots of bits of pages together to make a whole page.
Because a server script is run on the server, when it gets to the user, it's just plain html so there are no compatability issues.
Different hosts support different server scripting languages, so check with your host and then google for some tutorials on which ever languages they support.
ZPFounder
02-27-2005, 02:31 PM
Okay, I'll look into it. Thanx!