SlideShare a Scribd company logo
FormsHow to create a form using HTML
TodayPresentation on FormsUsing DreamweaverCreating a Form Using Dreamweaver.Practice Form
FormsMade of buttons, text fields, pull-down menus collectively called form controls. Used to collect information from the user.Application or script on the server that processes the information collected by the form.
Forms – What happens when submitted?Server -> Web ApplicationName = John DoeEmail = J.Doe@xyz.com
Form elementContainer for all the form's content and controls.<form action="/cig-bin/mailinglist.pl" method="post"> <ol><li><label>Name:<input type="text" name="name" id="name" />    </label></li><li><label>Email:      <input type="text" name="email" id="email" />    </label></li>"    <li><label>Click to Submit:       <input type="submit" name="Submit" id="Submit" value="Submit" />    </label></li>  </ol></form>
Form AttributesAction – provides the location of the script used to process the form information on the server.<formaction="/cig-bin/mailinglist.pl" method="post" > The .pl indicates the form is processed by a Perl script. Frequently also .php(PHP program), .asp (Microsoft ASP "Active Server Pages"),  .jsp(Java Server Pages), and other languages can be used.
Form – Method Attribute<form action="/cig-bin/mailinglist.pl" method="post"> Specifies how the information is sent to the server – either post or get.Name = John DoeEmail = J.Doe@xyz.comAfter browser encodesName="John%20Doe&email=J.Doe%40xyz.com
Form – Method Attribute<form action="/cig-bin/mailinglist.pl" method="post"> Post– Only the server sees the content of the request. Best method for secure information.Get – Not appropriate for forms with private or personal information. Has a limit of 256 characters.With Get Data is added to the URL of the script: http://www.band.com/cgi-bin/mailinglist.pl?Name="John%20Doe&email=J.Doe%40xyz.comForm ID Attribute<form action="/cig-bin/mailinglist.pl" method="post"> Identifies the form when there are multiple forms on the page.
Form –Name AttributeThe name attribute identifies the variable name for the control.<li><label>Name:<input type="text" name="name" id="name" /></label></li>Name=john%20doeNames for the controls must match with the variables expected by the script.
Forms –LabelsThe label element is used to associate the descriptive text with its associated form field. Important for speech-based browsers.<li><label>Name:<input type="text" name="name"/></label></li>Explicit Association -<li><label for="name">Name:<input type="text" name="name" id="name" /></label></li>
Forms –Fieldset and LengendUsed to create a logical group of form controls. May also include a legend element that provides a caption.
Forms –Fieldset and Lengend<fieldset><legend>Mailing List Sign Up</legend> <ol>   <li><label>Name:<input type="text" name="name" id="name" /></label></li><li><label>Email:<input type="text" name="email" id="email" /></label></li>    <li><label>Click to Submit:       <input type="submit" name="Submit" id="Submit" value="Submit" /></label></li>  </ol> </fieldset>
Forms – text entry<input type = "text" />Additional Attributes:Value – specifies the default text that appears in the field.Size – default is 20 characters wide but you can choose the character width.Maxlength– default is unlimited. You can choose a maximum number of characters that you want entered.<input type="text" name="city" value="Winooski" size="25" maxlength="50" /><input type="password" />
Forms – Multiline text entry<textarea>…</textarea>Use when you want your users to be able to enter more than one line of text.<textarea name="comment" rows="5" cols="100">Enter your comment in 50 words or less. </textarea>
Forms –Input and Reset buttons<input type="submit" /><input type="reset" /><input type="submit" /> <input type="reset" value="start over />
Forms –Radio and checkbox buttons
Forms –Radio and checkbox buttons<fieldset><legend>How old are you?</legend>   <p>     <label><input type="radio" name="age" value="under24" checked="checked"/>        Under 24</label><br />     <label><input type="radio" name="age" value="25-34"/>25 to 34</label>      <br />     <label><input type="radio" name="age" value="45+"/> Over 45</label>      <br /></p> </fieldset>
Forms –Radio and checkbox buttons
Forms –Radio and checkbox buttons<fieldset> <legend>What type of music to you listen to?</legend>  <p>   <label><input type="checkbox" name="genre" value="Indie" checked="checked" />Indie Rock</label>    <br /><label><input type="checkbox" name="genre" value="Techno" />Techno</label>    <br /><label><input type="checkbox" name="genre" value="Latin"/>Latin</label>    <br />  </p> </fieldset>
Forms – Menus
Forms – Menus<fieldset> <legend>Which is your favorite band?</legend><select name="band"> <option>Jackson Five</option><option>Commodores</option><option>Supremes</option> </select></fieldset>
Forms – MenusUse the attribute select="selected" in the option tag when you want a value pre-selected.Use the attribute size="#"  in the select element when you want a menu to display as a scrolling list.
Forms 2010

More Related Content

What's hot (20)

PPT
Eye catching HTML BASICS tips: Learn easily
shabab shihan
 
PPTX
Html basic
Nital Shingala
 
PPTX
Basic HTML
coachhahn
 
ODP
The Basics of (X)HTML Tags
LearningNerd
 
PPT
Facebookcamp Toronto FBML
sboodram
 
PPT
Usable and Accessible Web Forms
massgov
 
PPTX
New HTML5/CSS3 techniques
mbeatrizoliveira
 
ODP
Html
irshadahamed
 
ODP
Html intro
kalaivani.g
 
PPT
Krazykoder struts2 ui_tags
Krazy Koder
 
PDF
Introduction to web development - HTML 5
Ayoub Ghozzi
 
PPT
Download Workshop Lecture
webhostingguy
 
PPT
static dynamic html tags
teach4uin
 
PPT
Html ppt by Fathima faculty Hasanath college for women bangalore
fathima12
 
PPT
Html ppt computer
Anmol Pant
 
DOCX
html tags
Kunal gupta
 
PPSX
HTML + CSS Examples
Mohamed Loey
 
PPT
Intro to html
anshuman rahi
 
Eye catching HTML BASICS tips: Learn easily
shabab shihan
 
Html basic
Nital Shingala
 
Basic HTML
coachhahn
 
The Basics of (X)HTML Tags
LearningNerd
 
Facebookcamp Toronto FBML
sboodram
 
Usable and Accessible Web Forms
massgov
 
New HTML5/CSS3 techniques
mbeatrizoliveira
 
Html intro
kalaivani.g
 
Krazykoder struts2 ui_tags
Krazy Koder
 
Introduction to web development - HTML 5
Ayoub Ghozzi
 
Download Workshop Lecture
webhostingguy
 
static dynamic html tags
teach4uin
 
Html ppt by Fathima faculty Hasanath college for women bangalore
fathima12
 
Html ppt computer
Anmol Pant
 
html tags
Kunal gupta
 
HTML + CSS Examples
Mohamed Loey
 
Intro to html
anshuman rahi
 

Viewers also liked (11)

PDF
AIA Spring'2010 last class: Making games ALIVE
Knowledge Engineering and Machine Learning Group
 
PDF
Normative Monitoring: Semantics and Implementation
Knowledge Engineering and Machine Learning Group
 
KEY
Engineering Social Reality with Inheritence Relations
Knowledge Engineering and Machine Learning Group
 
PPT
Tables overview 2010
Mark Carter
 
KEY
Computational Mechanisms for Norm Enforcement in Service-Oriented Architectures
Knowledge Engineering and Machine Learning Group
 
PPT
Creative commons
Mark Carter
 
PDF
cOnscienS: social and organizational framework for gaming AI
Knowledge Engineering and Machine Learning Group
 
PPT
Presentazione Convegno
RegionePuglia
 
PPT
How the web works june 2010
Mark Carter
 
AIA Spring'2010 last class: Making games ALIVE
Knowledge Engineering and Machine Learning Group
 
Normative Monitoring: Semantics and Implementation
Knowledge Engineering and Machine Learning Group
 
Engineering Social Reality with Inheritence Relations
Knowledge Engineering and Machine Learning Group
 
Tables overview 2010
Mark Carter
 
Computational Mechanisms for Norm Enforcement in Service-Oriented Architectures
Knowledge Engineering and Machine Learning Group
 
Creative commons
Mark Carter
 
cOnscienS: social and organizational framework for gaming AI
Knowledge Engineering and Machine Learning Group
 
Presentazione Convegno
RegionePuglia
 
How the web works june 2010
Mark Carter
 
Ad

Similar to Forms 2010 (20)

PPTX
Php Form
lotlot
 
PPTX
03 handling requests
dhrubo kayal
 
PPT
YL Intro html
dilom1986
 
PPT
Component and Event-Driven Architectures in PHP
Stephan Schmidt
 
ODP
Html
jayakarthi
 
ODP
Html
jayakarthi
 
PPT
Lecture1 B Frames&Forms
Sur College of Applied Sciences
 
PPT
KMUTNB - Internet Programming 3/7
phuphax
 
PPT
Getting the Most Out of OpenSocial Gadgets
Atlassian
 
PPT
Week32
H K
 
PPT
Week32
H K
 
PPS
Quick Referance to WML
Nitin Saswade
 
PPTX
ColdFusion Builder Extensions
Terry Ryan
 
PPTX
Using Forms in Share
Alfresco Software
 
PPT
We9 Struts 2.0
wangjiaz
 
PPT
Lect_html1
ibrahim osama
 
PPT
Html part2
suba_sqa
 
PPT
Html part2 (1)
suba_sqa
 
Php Form
lotlot
 
03 handling requests
dhrubo kayal
 
YL Intro html
dilom1986
 
Component and Event-Driven Architectures in PHP
Stephan Schmidt
 
Lecture1 B Frames&Forms
Sur College of Applied Sciences
 
KMUTNB - Internet Programming 3/7
phuphax
 
Getting the Most Out of OpenSocial Gadgets
Atlassian
 
Week32
H K
 
Week32
H K
 
Quick Referance to WML
Nitin Saswade
 
ColdFusion Builder Extensions
Terry Ryan
 
Using Forms in Share
Alfresco Software
 
We9 Struts 2.0
wangjiaz
 
Lect_html1
ibrahim osama
 
Html part2
suba_sqa
 
Html part2 (1)
suba_sqa
 
Ad

Forms 2010

  • 1. FormsHow to create a form using HTML
  • 2. TodayPresentation on FormsUsing DreamweaverCreating a Form Using Dreamweaver.Practice Form
  • 3. FormsMade of buttons, text fields, pull-down menus collectively called form controls. Used to collect information from the user.Application or script on the server that processes the information collected by the form.
  • 4. Forms – What happens when submitted?Server -> Web ApplicationName = John DoeEmail = [email protected]
  • 5. Form elementContainer for all the form's content and controls.<form action="/cig-bin/mailinglist.pl" method="post"> <ol><li><label>Name:<input type="text" name="name" id="name" /> </label></li><li><label>Email: <input type="text" name="email" id="email" /> </label></li>" <li><label>Click to Submit: <input type="submit" name="Submit" id="Submit" value="Submit" /> </label></li> </ol></form>
  • 6. Form AttributesAction – provides the location of the script used to process the form information on the server.<formaction="/cig-bin/mailinglist.pl" method="post" > The .pl indicates the form is processed by a Perl script. Frequently also .php(PHP program), .asp (Microsoft ASP "Active Server Pages"), .jsp(Java Server Pages), and other languages can be used.
  • 7. Form – Method Attribute<form action="/cig-bin/mailinglist.pl" method="post"> Specifies how the information is sent to the server – either post or get.Name = John DoeEmail = [email protected] browser encodesName="John%20Doe&email=J.Doe%40xyz.com
  • 8. Form – Method Attribute<form action="/cig-bin/mailinglist.pl" method="post"> Post– Only the server sees the content of the request. Best method for secure information.Get – Not appropriate for forms with private or personal information. Has a limit of 256 characters.With Get Data is added to the URL of the script: http://www.band.com/cgi-bin/mailinglist.pl?Name="John%20Doe&email=J.Doe%40xyz.comForm ID Attribute<form action="/cig-bin/mailinglist.pl" method="post"> Identifies the form when there are multiple forms on the page.
  • 9. Form –Name AttributeThe name attribute identifies the variable name for the control.<li><label>Name:<input type="text" name="name" id="name" /></label></li>Name=john%20doeNames for the controls must match with the variables expected by the script.
  • 10. Forms –LabelsThe label element is used to associate the descriptive text with its associated form field. Important for speech-based browsers.<li><label>Name:<input type="text" name="name"/></label></li>Explicit Association -<li><label for="name">Name:<input type="text" name="name" id="name" /></label></li>
  • 11. Forms –Fieldset and LengendUsed to create a logical group of form controls. May also include a legend element that provides a caption.
  • 12. Forms –Fieldset and Lengend<fieldset><legend>Mailing List Sign Up</legend> <ol> <li><label>Name:<input type="text" name="name" id="name" /></label></li><li><label>Email:<input type="text" name="email" id="email" /></label></li> <li><label>Click to Submit: <input type="submit" name="Submit" id="Submit" value="Submit" /></label></li> </ol> </fieldset>
  • 13. Forms – text entry<input type = "text" />Additional Attributes:Value – specifies the default text that appears in the field.Size – default is 20 characters wide but you can choose the character width.Maxlength– default is unlimited. You can choose a maximum number of characters that you want entered.<input type="text" name="city" value="Winooski" size="25" maxlength="50" /><input type="password" />
  • 14. Forms – Multiline text entry<textarea>…</textarea>Use when you want your users to be able to enter more than one line of text.<textarea name="comment" rows="5" cols="100">Enter your comment in 50 words or less. </textarea>
  • 15. Forms –Input and Reset buttons<input type="submit" /><input type="reset" /><input type="submit" /> <input type="reset" value="start over />
  • 16. Forms –Radio and checkbox buttons
  • 17. Forms –Radio and checkbox buttons<fieldset><legend>How old are you?</legend> <p> <label><input type="radio" name="age" value="under24" checked="checked"/> Under 24</label><br /> <label><input type="radio" name="age" value="25-34"/>25 to 34</label> <br /> <label><input type="radio" name="age" value="45+"/> Over 45</label> <br /></p> </fieldset>
  • 18. Forms –Radio and checkbox buttons
  • 19. Forms –Radio and checkbox buttons<fieldset> <legend>What type of music to you listen to?</legend> <p> <label><input type="checkbox" name="genre" value="Indie" checked="checked" />Indie Rock</label> <br /><label><input type="checkbox" name="genre" value="Techno" />Techno</label> <br /><label><input type="checkbox" name="genre" value="Latin"/>Latin</label> <br /> </p> </fieldset>
  • 21. Forms – Menus<fieldset> <legend>Which is your favorite band?</legend><select name="band"> <option>Jackson Five</option><option>Commodores</option><option>Supremes</option> </select></fieldset>
  • 22. Forms – MenusUse the attribute select="selected" in the option tag when you want a value pre-selected.Use the attribute size="#" in the select element when you want a menu to display as a scrolling list.