SlideShare a Scribd company logo
Forms
Forms Forms are used for e-commerce, online purchases, surveys, registrations, etc. Websites using forms usually collect information and must use secure internet connections Sending information via forms is easy and automatic The information is sent using  name/value  pairs: It can be submitted/written to a database  It can be e-mailed to someone
Structure & Communication There are two distinct parts: front end and back end Front end  is the visible part in the browser where the user enters data Back end  is the invisible part and is a computer program that processes the information Developing front end is much simpler than developing the back end Front end uses XHTML, while back end uses knowledge of programming languages The  <form>  tag with  action  attribute develops the link between the front and the back ends
Structure & Communication
Elements The form elements are:  text fields  – allows you to input a line of text Parameters: size and maximum length radio buttons  – provide multiple choices with only one selection  Parameters: checked or unchecked check boxes  – provide multiple choices with multiple selections Parameters: checked or unchecked Menus  – Provides a menu of verbose choices Parameter: size  text areas  – Provide multiple lines of text Parameters: width and height submit buttons  – collects and sends form input Parameters: button label reset buttons  – erases or clears the form input Parameters : button label
Elements
Layout & Design Form design tips: Keep the form short Keep the form simple Keep the form organised Arrange form elements with  tables and layers The common theme for each form is: All forms have a submit and reset button Every form has an  action  attribute and a  method
Layout & Design
Using Forms There are 5 XHTML tags that can be used <form>  - Allows you to create a layout  Attributes : name, action, method, enctype, accept-charset, accept  <input>  - creates form elements Attributes  : type, name, value, size, maxlength, checked, src <select>  - creates a menu Attributes  : name, size, multiple <option>  - creates menu items Attributes  : selected, value, label  <textarea>  - creates a text area Attributes : name, rows, cols, wrap
Using Forms Create a web page that uses text fields
Using Forms The start of the code for this form is as follows: <form name=&quot;MyForm&quot; action=&quot;mailto:youremailaddress@dit.ie&quot; method=&quot;post&quot;> Enter your name: <br/> First name: <input type=&quot;text&quot; name=&quot;First Name&quot; size=&quot;40&quot; maxlength=&quot;256&quot;  value=&quot;James&quot; /> MI: <input type=&quot;text&quot; name=&quot;Middle Initial&quot; size=&quot;5&quot; maxlength=&quot;6&quot; value=&quot;D&quot; /> Last name: <input type=&quot;text&quot; name=&quot;Second Name&quot; size=&quot;40&quot; maxlength=&quot;256&quot;  value=&quot;Carswell&quot; /> <br/> Address: <input type=&quot;text&quot; name=&quot;Address&quot; size=&quot;10&quot; maxlength=&quot;30&quot;/> <input type=&quot;submit&quot; value=&quot;Send It&quot; /> <input type=&quot;reset&quot; value=&quot;Reset It&quot; /> </form>
Using Forms Create a web page that uses check boxes <form name=&quot;MyForm2&quot;  action=&quot;mailto:youremailaddress@dit.ie&quot;  method=&quot;post&quot;> <input type=&quot;checkbox&quot;  name=&quot;FavouriteFood&quot; value=&quot;Pizza&quot;  checked/> Pizza <input type=&quot;checkbox&quot; name=&quot;  FavouriteFood&quot; value=&quot;Salad&quot; />  Salad <input type=&quot;checkbox&quot; name=&quot;  FavouriteFood &quot; value=&quot;Burger&quot; />  Burger<br/> <input type=&quot;submit&quot; value=&quot;Send It&quot; /> <input type=&quot;reset&quot; value=&quot;Reset It&quot; /> </form>
Using Forms Create a web page that uses radio buttons <form name=&quot;MyForm3&quot;  action=&quot;mailto:youremailaddress@dit.ie&quot;  method=&quot;post&quot;> <input type=&quot;radio&quot; name=&quot;gender&quot;  value=&quot;male&quot; /> Male<br /> <input type=&quot;radio&quot; name=&quot;gender&quot;  value=&quot;female&quot; /> Female<br /> <input type=&quot;submit&quot; value=&quot;Send It&quot; /> <input type=&quot;reset&quot; value=&quot;Reset It&quot; /> </form>
Using Forms Create a web page that uses buttons <form name=&quot;MyForm4&quot;  action=&quot;mailto:youremailaddress@dit.ie&quot;  method=&quot;post&quot;> Select your favourite season: <input type=&quot;button&quot; value=&quot;Fallish&quot; /> <input type=&quot;button&quot; value=&quot;Winter&quot; /> <input type=&quot;button&quot; value=&quot;Spring&quot; /> <input type=&quot;button&quot; value=&quot;Summer&quot; /><br /> </form>
Using Forms Create a web page that uses menus <form action=&quot;mailto:email@address.com&quot;  method=&quot;post&quot;> <select name=&quot;compHardware&quot;  size=&quot;4&quot;> <option> Disk Drive</option> <option > More RAM</option> <option selected> Zip drive</option> <option> New monitor</option> </select> </form>
Formatting Forms A form may have multiple elements The form elements must be organised to make it easier for the web surfers to fill them When using tables, form elements are a part of the table cells -> can get quite complex Formatting forms by using layers is easier and offers more flexibility
Formatting Forms Format form with tables <table align=&quot;center&quot;> <caption><h2 align=&quot;center&quot;>Please fill this survey </h2></caption> <form name=&quot;myForm&quot; method=&quot;post&quot; action=&quot;mailto:a@b.com&quot;> <tr> <td>First Name:</td> <td><input type=&quot;text&quot; name=&quot;first&quot; size=&quot;10&quot;  maxlength=&quot;15&quot;></td> <td>MI:</td> <td><input type=&quot;text&quot; name=&quot;mi&quot;  size=&quot;1&quot;></td> <td>Last Name:</td> <td><input type=&quot;text&quot; name=&quot;last&quot; size=&quot;10&quot;  maxlength=&quot;18&quot;></td> </tr> </form> </table>

More Related Content

PPTX
Forms 2010
PPT
Usable and Accessible Web Forms
PPT
Html in a box
PPT
Facebookcamp Toronto FBML
PPTX
Html basic
PPT
Lecture 2 - Comm Lab: Web @ ITP
PPT
Intro Html
PPT
Html text formatting
Forms 2010
Usable and Accessible Web Forms
Html in a box
Facebookcamp Toronto FBML
Html basic
Lecture 2 - Comm Lab: Web @ ITP
Intro Html
Html text formatting

Viewers also liked (6)

PPT
Kshivets O. Gastric Cancer Relapse Surgery
PPTX
Reanimating Data: Creative Methods of Knowledge Exchange
PPTX
Top 12 spa resume tips
PPT
Lovesick Sentimentalism
PDF
2013 02 07 Michael Morrow
PPT
9..myeloprolef
Kshivets O. Gastric Cancer Relapse Surgery
Reanimating Data: Creative Methods of Knowledge Exchange
Top 12 spa resume tips
Lovesick Sentimentalism
2013 02 07 Michael Morrow
9..myeloprolef
Ad

Similar to Forms (20)

PPTX
HTML FORMS.pptx
ODP
Zend Form Tutorial
PPTX
03 handling requests
PPTX
Php Form
PPT
Component and Event-Driven Architectures in PHP
PPTX
DOC
Html basics 10 form
 
PPTX
Developing with HTML5
PPT
Lecture1 B Frames&Forms
PPT
YL Intro html
PPT
Flex For Flash Developers Ff 2006 Final
PPTX
Input tags (report)
PPT
Website Integration with QuickBase - Joshua McGinnis
PPT
ARTDM 171, Week 13: Forms
PPT
Neil Patel - What You Need to be Measuring and How to Do It
PPTX
Form Validation
PPT
ImplementingChangeTrackingAndFlagging
PPT
HTML5 Overview
HTML FORMS.pptx
Zend Form Tutorial
03 handling requests
Php Form
Component and Event-Driven Architectures in PHP
Html basics 10 form
 
Developing with HTML5
Lecture1 B Frames&Forms
YL Intro html
Flex For Flash Developers Ff 2006 Final
Input tags (report)
Website Integration with QuickBase - Joshua McGinnis
ARTDM 171, Week 13: Forms
Neil Patel - What You Need to be Measuring and How to Do It
Form Validation
ImplementingChangeTrackingAndFlagging
HTML5 Overview
Ad

More from Digital Insights - Digital Marketing Agency (20)

PPT
Diploma-GCD-ContentMarketing-Personas-Week2
PPT
DigitalInsights-DigitalMarketingStrategy&Planning
PPT
PPT
DBS-Week2-DigitalStrategySession
PPT
GCD-Measurement&Analytics-Week11
PPT
DBS-Week1-Introduction&OverviewDigitalMarketing
PPT
DCEB-DigitalStrategySession-Jan24th
PPTX
PPT
PPTX
Week12-DBS-ReviewAndPlanningSession
PPT
GCD-Week5-Facebook-LinkedIn-Ads
PPT
DBS-Week11-Measurement&Analyics
PPT
PPTX
DBS-Week10-EcommSites&SalesFunnells
PPT
GCD-Week5-SocialMediaPlatforms
PPT
DBS-Week3-B2C&B2B-ContentMarketing-Session
PPTX
DBS-Week9-Wordpress-Session
Diploma-GCD-ContentMarketing-Personas-Week2
DigitalInsights-DigitalMarketingStrategy&Planning
DBS-Week2-DigitalStrategySession
GCD-Measurement&Analytics-Week11
DBS-Week1-Introduction&OverviewDigitalMarketing
DCEB-DigitalStrategySession-Jan24th
Week12-DBS-ReviewAndPlanningSession
GCD-Week5-Facebook-LinkedIn-Ads
DBS-Week11-Measurement&Analyics
DBS-Week10-EcommSites&SalesFunnells
GCD-Week5-SocialMediaPlatforms
DBS-Week3-B2C&B2B-ContentMarketing-Session
DBS-Week9-Wordpress-Session

Recently uploaded (20)

PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Modernising the Digital Integration Hub
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
August Patch Tuesday
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Getting Started with Data Integration: FME Form 101
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
project resource management chapter-09.pdf
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Tartificialntelligence_presentation.pptx
PDF
STKI Israel Market Study 2025 version august
PPT
What is a Computer? Input Devices /output devices
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
TLE Review Electricity (Electricity).pptx
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Programs and apps: productivity, graphics, security and other tools
Modernising the Digital Integration Hub
NewMind AI Weekly Chronicles - August'25-Week II
August Patch Tuesday
Module 1.ppt Iot fundamentals and Architecture
Getting Started with Data Integration: FME Form 101
Web App vs Mobile App What Should You Build First.pdf
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
project resource management chapter-09.pdf
NewMind AI Weekly Chronicles – August ’25 Week III
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Tartificialntelligence_presentation.pptx
STKI Israel Market Study 2025 version august
What is a Computer? Input Devices /output devices
DP Operators-handbook-extract for the Mautical Institute
Assigned Numbers - 2025 - Bluetooth® Document
TLE Review Electricity (Electricity).pptx

Forms

  • 2. Forms Forms are used for e-commerce, online purchases, surveys, registrations, etc. Websites using forms usually collect information and must use secure internet connections Sending information via forms is easy and automatic The information is sent using name/value pairs: It can be submitted/written to a database It can be e-mailed to someone
  • 3. Structure & Communication There are two distinct parts: front end and back end Front end is the visible part in the browser where the user enters data Back end is the invisible part and is a computer program that processes the information Developing front end is much simpler than developing the back end Front end uses XHTML, while back end uses knowledge of programming languages The <form> tag with action attribute develops the link between the front and the back ends
  • 5. Elements The form elements are: text fields – allows you to input a line of text Parameters: size and maximum length radio buttons – provide multiple choices with only one selection Parameters: checked or unchecked check boxes – provide multiple choices with multiple selections Parameters: checked or unchecked Menus – Provides a menu of verbose choices Parameter: size text areas – Provide multiple lines of text Parameters: width and height submit buttons – collects and sends form input Parameters: button label reset buttons – erases or clears the form input Parameters : button label
  • 7. Layout & Design Form design tips: Keep the form short Keep the form simple Keep the form organised Arrange form elements with tables and layers The common theme for each form is: All forms have a submit and reset button Every form has an action attribute and a method
  • 9. Using Forms There are 5 XHTML tags that can be used <form> - Allows you to create a layout Attributes : name, action, method, enctype, accept-charset, accept <input> - creates form elements Attributes : type, name, value, size, maxlength, checked, src <select> - creates a menu Attributes : name, size, multiple <option> - creates menu items Attributes : selected, value, label <textarea> - creates a text area Attributes : name, rows, cols, wrap
  • 10. Using Forms Create a web page that uses text fields
  • 11. Using Forms The start of the code for this form is as follows: <form name=&quot;MyForm&quot; action=&quot;mailto:youremailaddress@dit.ie&quot; method=&quot;post&quot;> Enter your name: <br/> First name: <input type=&quot;text&quot; name=&quot;First Name&quot; size=&quot;40&quot; maxlength=&quot;256&quot; value=&quot;James&quot; /> MI: <input type=&quot;text&quot; name=&quot;Middle Initial&quot; size=&quot;5&quot; maxlength=&quot;6&quot; value=&quot;D&quot; /> Last name: <input type=&quot;text&quot; name=&quot;Second Name&quot; size=&quot;40&quot; maxlength=&quot;256&quot; value=&quot;Carswell&quot; /> <br/> Address: <input type=&quot;text&quot; name=&quot;Address&quot; size=&quot;10&quot; maxlength=&quot;30&quot;/> <input type=&quot;submit&quot; value=&quot;Send It&quot; /> <input type=&quot;reset&quot; value=&quot;Reset It&quot; /> </form>
  • 12. Using Forms Create a web page that uses check boxes <form name=&quot;MyForm2&quot; action=&quot;mailto:youremailaddress@dit.ie&quot; method=&quot;post&quot;> <input type=&quot;checkbox&quot; name=&quot;FavouriteFood&quot; value=&quot;Pizza&quot; checked/> Pizza <input type=&quot;checkbox&quot; name=&quot; FavouriteFood&quot; value=&quot;Salad&quot; /> Salad <input type=&quot;checkbox&quot; name=&quot; FavouriteFood &quot; value=&quot;Burger&quot; /> Burger<br/> <input type=&quot;submit&quot; value=&quot;Send It&quot; /> <input type=&quot;reset&quot; value=&quot;Reset It&quot; /> </form>
  • 13. Using Forms Create a web page that uses radio buttons <form name=&quot;MyForm3&quot; action=&quot;mailto:youremailaddress@dit.ie&quot; method=&quot;post&quot;> <input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;male&quot; /> Male<br /> <input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;female&quot; /> Female<br /> <input type=&quot;submit&quot; value=&quot;Send It&quot; /> <input type=&quot;reset&quot; value=&quot;Reset It&quot; /> </form>
  • 14. Using Forms Create a web page that uses buttons <form name=&quot;MyForm4&quot; action=&quot;mailto:youremailaddress@dit.ie&quot; method=&quot;post&quot;> Select your favourite season: <input type=&quot;button&quot; value=&quot;Fallish&quot; /> <input type=&quot;button&quot; value=&quot;Winter&quot; /> <input type=&quot;button&quot; value=&quot;Spring&quot; /> <input type=&quot;button&quot; value=&quot;Summer&quot; /><br /> </form>
  • 15. Using Forms Create a web page that uses menus <form action=&quot;mailto:email@address.com&quot; method=&quot;post&quot;> <select name=&quot;compHardware&quot; size=&quot;4&quot;> <option> Disk Drive</option> <option > More RAM</option> <option selected> Zip drive</option> <option> New monitor</option> </select> </form>
  • 16. Formatting Forms A form may have multiple elements The form elements must be organised to make it easier for the web surfers to fill them When using tables, form elements are a part of the table cells -> can get quite complex Formatting forms by using layers is easier and offers more flexibility
  • 17. Formatting Forms Format form with tables <table align=&quot;center&quot;> <caption><h2 align=&quot;center&quot;>Please fill this survey </h2></caption> <form name=&quot;myForm&quot; method=&quot;post&quot; action=&quot;mailto:a@b.com&quot;> <tr> <td>First Name:</td> <td><input type=&quot;text&quot; name=&quot;first&quot; size=&quot;10&quot; maxlength=&quot;15&quot;></td> <td>MI:</td> <td><input type=&quot;text&quot; name=&quot;mi&quot; size=&quot;1&quot;></td> <td>Last Name:</td> <td><input type=&quot;text&quot; name=&quot;last&quot; size=&quot;10&quot; maxlength=&quot;18&quot;></td> </tr> </form> </table>