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

PPT
Lecture 2 - Comm Lab: Web @ ITP
ODP
Zend Form Tutorial
PPT
Intro Html
PPT
Html text formatting
PPT
Learning HTML
PPT
Html Ppt
PPT
Understanding THML
ODP
Htmltag.ppt
Lecture 2 - Comm Lab: Web @ ITP
Zend Form Tutorial
Intro Html
Html text formatting
Learning HTML
Html Ppt
Understanding THML
Htmltag.ppt

What's hot (20)

PPT
Eye catching HTML BASICS tips: Learn easily
PPTX
Html basic
PPTX
Basic HTML
ODP
The Basics of (X)HTML Tags
PPT
Facebookcamp Toronto FBML
PPT
Usable and Accessible Web Forms
PPTX
New HTML5/CSS3 techniques
ODP
ODP
Html intro
PPT
Krazykoder struts2 ui_tags
PDF
Introduction to web development - HTML 5
PPT
Download Workshop Lecture
PPT
static dynamic html tags
PPT
Html ppt by Fathima faculty Hasanath college for women bangalore
PPT
Html ppt computer
DOCX
html tags
PPSX
HTML + CSS Examples
PPT
Intro to html
Eye catching HTML BASICS tips: Learn easily
Html basic
Basic HTML
The Basics of (X)HTML Tags
Facebookcamp Toronto FBML
Usable and Accessible Web Forms
New HTML5/CSS3 techniques
Html intro
Krazykoder struts2 ui_tags
Introduction to web development - HTML 5
Download Workshop Lecture
static dynamic html tags
Html ppt by Fathima faculty Hasanath college for women bangalore
Html ppt computer
html tags
HTML + CSS Examples
Intro to html
Ad

Viewers also liked (11)

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

Similar to Forms 2010 (20)

PPTX
Php Form
PPTX
Chapter 9: Forms
PPT
PHP - Introduction to PHP Forms
PPTX
HNDIT1022 Week 03 Part 2 Theory information.pptx
PPTX
HTML FORMS.pptx
PPT
ARTDM 171, Week 13: Forms
DOCX
PDF
Html advanced-reference-guide for creating web forms
PPTX
Html Xhtml And Xml 3e Tutorial 6
ODP
Form Processing In Php
PPTX
PDF
Cmsc 100 (web forms)
PPTX
Html form
PDF
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART III.pdf
PPTX
Chapter 2 class power point
PDF
Tm 1st quarter - 2nd meeting
KEY
Creating forms
PPTX
Html forms
PPTX
All about forms [autosaved]
PPTX
Web design - Working with forms in HTML
Php Form
Chapter 9: Forms
PHP - Introduction to PHP Forms
HNDIT1022 Week 03 Part 2 Theory information.pptx
HTML FORMS.pptx
ARTDM 171, Week 13: Forms
Html advanced-reference-guide for creating web forms
Html Xhtml And Xml 3e Tutorial 6
Form Processing In Php
Cmsc 100 (web forms)
Html form
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART III.pdf
Chapter 2 class power point
Tm 1st quarter - 2nd meeting
Creating forms
Html forms
All about forms [autosaved]
Web design - Working with forms in HTML

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 = J.Doe@xyz.com
  • 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 = J.Doe@xyz.comAfter 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.