SlideShare una empresa de Scribd logo
1 de 23
Forms How to create a form using HTML
Today Presentation on Forms Using Dreamweaver Creating a Form Using Dreamweaver. Practice Form
Forms Made 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 Application Name = John Doe Email = J.Doe@xyz.com
Form element Container 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 Attributes Action – 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 Doe Email = J.Doe@xyz.com After browser encodes Name="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. ,[object Object],[object Object]
Form –Name Attribute The name attribute identifies the variable name for the control. <li><label>Name:<input type="text" name="name" id="name" /></label></li> Name=john%20doe Names for the controls must match with the variables expected by the script.
Forms –Labels The 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 Lengend Used 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 – Menus Use 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

Más contenido relacionado

La actualidad más candente

Krazykoder struts2 ui_tags
Krazykoder struts2 ui_tagsKrazykoder struts2 ui_tags
Krazykoder struts2 ui_tags
Krazy Koder
 
Download Workshop Lecture
Download Workshop LectureDownload Workshop Lecture
Download Workshop Lecture
webhostingguy
 

La actualidad más candente (20)

Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
 
Html basic
Html basicHtml basic
Html basic
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
The Basics of (X)HTML Tags
The Basics of (X)HTML TagsThe Basics of (X)HTML Tags
The Basics of (X)HTML Tags
 
Facebookcamp Toronto FBML
Facebookcamp Toronto FBMLFacebookcamp Toronto FBML
Facebookcamp Toronto FBML
 
Usable and Accessible Web Forms
Usable and Accessible Web FormsUsable and Accessible Web Forms
Usable and Accessible Web Forms
 
New HTML5/CSS3 techniques
New HTML5/CSS3 techniquesNew HTML5/CSS3 techniques
New HTML5/CSS3 techniques
 
Forms
FormsForms
Forms
 
Html
HtmlHtml
Html
 
Html intro
Html introHtml intro
Html intro
 
FBML
FBMLFBML
FBML
 
Krazykoder struts2 ui_tags
Krazykoder struts2 ui_tagsKrazykoder struts2 ui_tags
Krazykoder struts2 ui_tags
 
Introduction to web development - HTML 5
Introduction to web development - HTML 5Introduction to web development - HTML 5
Introduction to web development - HTML 5
 
Download Workshop Lecture
Download Workshop LectureDownload Workshop Lecture
Download Workshop Lecture
 
static dynamic html tags
static dynamic html tagsstatic dynamic html tags
static dynamic html tags
 
Html ppt by Fathima faculty Hasanath college for women bangalore
Html ppt by Fathima faculty Hasanath college for women bangaloreHtml ppt by Fathima faculty Hasanath college for women bangalore
Html ppt by Fathima faculty Hasanath college for women bangalore
 
Html ppt computer
Html ppt computerHtml ppt computer
Html ppt computer
 
html tags
html tagshtml tags
html tags
 
HTML + CSS Examples
HTML + CSS ExamplesHTML + CSS Examples
HTML + CSS Examples
 
Intro to html
Intro to htmlIntro to html
Intro to html
 

Destacado

Destacado (11)

AIA Spring'2010 last class: Making games ALIVE
AIA Spring'2010 last class: Making games ALIVEAIA Spring'2010 last class: Making games ALIVE
AIA Spring'2010 last class: Making games ALIVE
 
Norms Brmas08 V2
Norms Brmas08 V2Norms Brmas08 V2
Norms Brmas08 V2
 
Normative Monitoring: Semantics and Implementation
Normative Monitoring: Semantics and ImplementationNormative Monitoring: Semantics and Implementation
Normative Monitoring: Semantics and Implementation
 
Engineering Social Reality with Inheritence Relations
Engineering Social Reality with Inheritence RelationsEngineering Social Reality with Inheritence Relations
Engineering Social Reality with Inheritence Relations
 
EU-Contract Project
EU-Contract ProjectEU-Contract Project
EU-Contract Project
 
Tables overview 2010
Tables overview 2010Tables overview 2010
Tables overview 2010
 
Computational Mechanisms for Norm Enforcement in Service-Oriented Architectures
Computational Mechanisms for Norm Enforcement in Service-Oriented ArchitecturesComputational Mechanisms for Norm Enforcement in Service-Oriented Architectures
Computational Mechanisms for Norm Enforcement in Service-Oriented Architectures
 
Creative commons
Creative commonsCreative commons
Creative commons
 
cOnscienS: social and organizational framework for gaming AI
cOnscienS: social and organizational framework for gaming AIcOnscienS: social and organizational framework for gaming AI
cOnscienS: social and organizational framework for gaming AI
 
Presentazione Convegno
Presentazione ConvegnoPresentazione Convegno
Presentazione Convegno
 
How the web works june 2010
How the web works june 2010How the web works june 2010
How the web works june 2010
 

Similar a Forms 2010

Php Form
Php FormPhp Form
Php Form
lotlot
 
03 handling requests
03 handling requests03 handling requests
03 handling requests
dhrubo kayal
 
Getting the Most Out of OpenSocial Gadgets
Getting the Most Out of OpenSocial GadgetsGetting the Most Out of OpenSocial Gadgets
Getting the Most Out of OpenSocial Gadgets
Atlassian
 
Week32
Week32Week32
Week32
H K
 
Week32
Week32Week32
Week32
H K
 
We9 Struts 2.0
We9 Struts 2.0We9 Struts 2.0
We9 Struts 2.0
wangjiaz
 
Html part2
Html part2Html part2
Html part2
suba_sqa
 
Html part2 (1)
Html part2 (1)Html part2 (1)
Html part2 (1)
suba_sqa
 

Similar a Forms 2010 (20)

Php Form
Php FormPhp Form
Php Form
 
Lecture3
Lecture3Lecture3
Lecture3
 
03 handling requests
03 handling requests03 handling requests
03 handling requests
 
YL Intro html
YL Intro htmlYL Intro html
YL Intro html
 
Component and Event-Driven Architectures in PHP
Component and Event-Driven Architectures in PHPComponent and Event-Driven Architectures in PHP
Component and Event-Driven Architectures in PHP
 
Html
HtmlHtml
Html
 
Html
HtmlHtml
Html
 
Lecture1 B Frames&Forms
Lecture1 B  Frames&FormsLecture1 B  Frames&Forms
Lecture1 B Frames&Forms
 
KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7
 
Getting the Most Out of OpenSocial Gadgets
Getting the Most Out of OpenSocial GadgetsGetting the Most Out of OpenSocial Gadgets
Getting the Most Out of OpenSocial Gadgets
 
Week32
Week32Week32
Week32
 
Week32
Week32Week32
Week32
 
Quick Referance to WML
Quick Referance to WMLQuick Referance to WML
Quick Referance to WML
 
ColdFusion Builder Extensions
ColdFusion Builder ExtensionsColdFusion Builder Extensions
ColdFusion Builder Extensions
 
Using Forms in Share
Using Forms in ShareUsing Forms in Share
Using Forms in Share
 
Forms
FormsForms
Forms
 
We9 Struts 2.0
We9 Struts 2.0We9 Struts 2.0
We9 Struts 2.0
 
Lect_html1
Lect_html1Lect_html1
Lect_html1
 
Html part2
Html part2Html part2
Html part2
 
Html part2 (1)
Html part2 (1)Html part2 (1)
Html part2 (1)
 

Forms 2010

  • 1. Forms How to create a form using HTML
  • 2. Today Presentation on Forms Using Dreamweaver Creating a Form Using Dreamweaver. Practice Form
  • 3. Forms Made 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 Application Name = John Doe Email = J.Doe@xyz.com
  • 5. Form element Container 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 Attributes Action – 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 Doe Email = J.Doe@xyz.com After browser encodes Name="John%20Doe&email=J.Doe%40xyz.com
  • 8.
  • 9. Form –Name Attribute The name attribute identifies the variable name for the control. <li><label>Name:<input type="text" name="name" id="name" /></label></li> Name=john%20doe Names for the controls must match with the variables expected by the script.
  • 10. Forms –Labels The 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 Lengend Used 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 – Menus Use 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.