Created
October 27, 2015 00:01
-
-
Save JamesVanWaza/1201d50cd11fccd19179 to your computer and use it in GitHub Desktop.
Setting up a form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="form-submission.cfm"></form> | |
<!--Using the variables from form.html--> | |
<form action="form-submission.cfm" method="get"></form> | |
<!-- | |
WHEN TO USE GET | |
If the form submission is passive (like a search engine query), and without sensitive information.--> | |
<form action="form-submission.cfm" method="post"></form> | |
<!-- | |
WHEN TO USE POST | |
If the form is updating data, or includes sensitive information (password).--> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Form Element--> | |
<form></form> | |
<form> | |
<fieldset> | |
<legend>Personal Information</legend> | |
<label>First Name</label> | |
<input type="text" name=fname><!--fname is used as a variable--> | |
<label>Last Name</label> | |
<input type="text" name="lname"> | |
<textarea></textarea> | |
</fieldset> | |
<br> | |
<fieldset> | |
<legend>Radio Buttons</legend> | |
<input type="radio" name="gender" value="male">Male<!--only one option can be selected either Male or Female--> | |
<label>Last Name</label> | |
<input type="radio" name="gender" value="female">Female | |
</fieldset> | |
<input type="Submit"> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment