SlideShare ist ein Scribd-Unternehmen logo
1 von 59
CREATING FORMS
  by Ray Villalobos
WHAT ARE FORMS?
WHAT ARE FORMS?


• Create   interactions with server
WHAT ARE FORMS?


• Create   interactions with server

• Compound     tag
WHAT ARE FORMS?


• Create   interactions with server

• Compound     tag

• Accept   user input in various ways
FORM TAG
           <form action="formprocessor.php">
             First name: <input type="text" name="fname"><br>
             <input type="submit">
           </form>
FORM TAG
                                    <form action="formprocessor.php">
                                      First name: <input type="text" name="fname"><br>
                                      <input type="submit">
                                    </form>




• Action   Parameters tells browser where to send data
FORM TAG
                                    <form action="formprocessor.php">
                                      First name: <input type="text" name="fname"><br>
                                      <input type="submit">
                                    </form>




• Action   Parameters tells browser where to send data

• Method tells browser to pass data as URL (GET) or in the
 background(POST)
FORM TAG
                                    <form action="formprocessor.php">
                                      First name: <input type="text" name="fname"><br>
                                      <input type="submit">
                                    </form>




• Action   Parameters tells browser where to send data

• Method tells browser to pass data as URL (GET) or in the
 background(POST)

• Enctype   specifies how to encode the data
THE GET METHOD
THE GET METHOD

• Passes   data as a URL
THE GET METHOD

• Passes   data as a URL

• Name/Value Pairs (? then name=values
 separated by &)
THE GET METHOD

• Passes   data as a URL

• Name/Value Pairs (? then name=values
 separated by &)

• Useful   for bookmarking
THE GET METHOD

• Passes   data as a URL

• Name/Value Pairs (? then name=values
 separated by &)

• Useful   for bookmarking

• Limit   to how much you can place in URL
THE GET METHOD

• Passes   data as a URL

• Name/Value Pairs (? then name=values
 separated by &)

• Useful   for bookmarking

• Limit   to how much you can place in URL

• Not   for sensitive info
THE POST METHOD
THE POST METHOD


• Sends   the data as an HTTP transaction
THE POST METHOD


• Sends   the data as an HTTP transaction

• Cannot   be bookmarked
THE POST METHOD


• Sends   the data as an HTTP transaction

• Cannot   be bookmarked

• More    secure than GET
THE POST METHOD


• Sends   the data as an HTTP transaction

• Cannot    be bookmarked

• More    secure than GET

• Does    not have size limitations
ENCTYPE




             Value                                     Description
                                    Default. Characters encoded before sent (spaces converted to
application/x-www-form-urlencoded
                                    "+" symbols, special characters converted to ASCII/HEX)


multipart/form-data                 No characters are encoded. Required for file uploads


text/plain                          Spaces are converted to "+" symbols, nothing else
ENCTYPE
• Defines now form data is encoded for
 sending to server




              Value                                     Description
                                     Default. Characters encoded before sent (spaces converted to
 application/x-www-form-urlencoded
                                     "+" symbols, special characters converted to ASCII/HEX)


 multipart/form-data                 No characters are encoded. Required for file uploads


 text/plain                          Spaces are converted to "+" symbols, nothing else
ENCTYPE
• Defines now form data is encoded for
 sending to server

• Only         needed if method is POST



               Value                                     Description
                                      Default. Characters encoded before sent (spaces converted to
  application/x-www-form-urlencoded
                                      "+" symbols, special characters converted to ASCII/HEX)


  multipart/form-data                 No characters are encoded. Required for file uploads


  text/plain                          Spaces are converted to "+" symbols, nothing else
ENCTYPE
• Defines now form data is encoded for
 sending to server

• Only         needed if method is POST

• Can          be one of three

               Value                                     Description
                                      Default. Characters encoded before sent (spaces converted to
  application/x-www-form-urlencoded
                                      "+" symbols, special characters converted to ASCII/HEX)


  multipart/form-data                 No characters are encoded. Required for file uploads


  text/plain                          Spaces are converted to "+" symbols, nothing else
INPUT   name: <input name="fname"><br />
INPUT                  name: <input name="fname"><br />




• Most   common and versatile form element
INPUT                    name: <input name="fname"><br />




• Most   common and versatile form element

• Manydifferent types: text, checkbox, password, radio, file,
 hidden, image, submit, reset,
INPUT                    name: <input name="fname"><br />




• Most   common and versatile form element

• Manydifferent types: text, checkbox, password, radio, file,
 hidden, image, submit, reset,

• HTML5  & Mobile: color, date, datetime, datetime-local, email,
 month, number, range, search, tel, time, url, week
COMMON INPUT ATTRIBUTES
COMMON INPUT ATTRIBUTES

 • name/value: the   name and values that will be sent to
  the action URL
COMMON INPUT ATTRIBUTES

 • name/value: the   name and values that will be sent to
  the action URL

 • checked: on
             checkboxes/radio buttons, this displays
  checkbox or radio as pre-selected
COMMON INPUT ATTRIBUTES

 • name/value: the   name and values that will be sent to
  the action URL

 • checked: on
             checkboxes/radio buttons, this displays
  checkbox or radio as pre-selected

 • src: on   input type image the URL of the image
COMMON INPUT ATTRIBUTES

 • name/value: the   name and values that will be sent to
  the action URL

 • checked: on
             checkboxes/radio buttons, this displays
  checkbox or radio as pre-selected

 • src: on   input type image the URL of the image

 • HTML5: autofocus, autocomplete, placeholder, required
LABEL   <label for="myname">Male</label>
        <input id="myname" name="name" /><br>
LABEL               <label for="myname">Male</label>
                               <input id="myname" name="name" /><br>




• Every   field should have a label
LABEL               <label for="myname">Male</label>
                               <input id="myname" name="name" /><br>




• Every   field should have a label

• Helps   with Usability, mobile devices
LABEL                <label for="myname">Male</label>
                                <input id="myname" name="name" /><br>




• Every   field should have a label

• Helps   with Usability, mobile devices

• for   attribute ties the text to the input field
LABEL                <label for="myname">Male</label>
                                <input id="myname" name="name" /><br>




• Every   field should have a label

• Helps   with Usability, mobile devices

• for   attribute ties the text to the input field

• Makes   label activate input field
TEXTAREA   <textarea name="comments" rows="4" cols="50"></textarea>
TEXTAREA                    <textarea name="comments" rows="4" cols="50"></textarea>




• Multi   line text input
TEXTAREA                     <textarea name="comments" rows="4" cols="50"></textarea>




• Multi   line text input

• Beginning   and end tag.
TEXTAREA                     <textarea name="comments" rows="4" cols="50"></textarea>




• Multi   line text input

• Beginning   and end tag.

• maxlength: max     # of characters allowed
TEXTAREA                     <textarea name="comments" rows="4" cols="50"></textarea>




• Multi   line text input

• Beginning   and end tag.

• maxlength: max     # of characters allowed

• Youcan use the rows and cols attribute, but
 usually better to dene size with CSS.
SELECT   <select name="referral">
           <option>Choose...</option>
           <option value="fb">Facebook</option>
         </select>
SELECT      <select name="referral">
                       <option>Choose...</option>
                       <option value="fb">Facebook</option>
                     </select>




• Drop   down list
SELECT                        <select name="referral">
                                         <option>Choose...</option>
                                         <option value="fb">Facebook</option>
                                       </select>




• Drop   down list

• <option>   tags define individual options for dropdown
SELECT                         <select name="referral">
                                          <option>Choose...</option>
                                          <option value="fb">Facebook</option>
                                        </select>




• Drop   down list

• <option>   tags define individual options for dropdown

• Name   within <option> is label, not value
SELECT                         <select name="referral">
                                           <option>Choose...</option>
                                           <option value="fb">Facebook</option>
                                         </select>




• Drop    down list

• <option>    tags define individual options for dropdown

• Name    within <option> is label, not value

• Value
      attribute on option tag sends value to action
 URL with name from select tag.
SELECT                           <select name="referral">
                                             <option>Choose...</option>
                                             <option value="fb">Facebook</option>
                                           </select>




• Drop    down list

• <option>     tags define individual options for dropdown

• Name    within <option> is label, not value

• Value
      attribute on option tag sends value to action
 URL with name from select tag.

• Multiple   attribute lets you select multiple items at once
BUTTON   <button type="button">Click Me!</button>
BUTTON                 <button type="button">Click Me!</button>




•A   clickable button
BUTTON                        <button type="button">Click Me!</button>




•A   clickable button

• Almost   exactly like input type=submit
BUTTON                         <button type="button">Click Me!</button>




•A   clickable button

• Almost   exactly like input type=submit

• type   can be button, reset or submit
BUTTON                         <button type="button">Click Me!</button>




•A   clickable button

• Almost    exactly like input type=submit

• type   can be button, reset or submit

• Can    use outside of forms
FIELDSET
FIELDSET

• Groups   form elements togethers
FIELDSET

• Groups   form elements togethers

• Drawsa box around related elements in
 most browsers
FIELDSET

• Groups   form elements togethers

• Drawsa box around related elements in
 most browsers

• Youuse the <legend> tag to define the
 eldset's title
THE END

Weitere ähnliche Inhalte

Was ist angesagt?

HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookScottperrone
 
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)ClĂŠment Wehrung
 
Origins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLOrigins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLHowpk
 
Week 2 HTML lists, hyperlinks, tables, and images
Week 2 HTML lists, hyperlinks, tables, and imagesWeek 2 HTML lists, hyperlinks, tables, and images
Week 2 HTML lists, hyperlinks, tables, and imagesRowena LI
 
Xhtml 2010
Xhtml 2010Xhtml 2010
Xhtml 2010guest0f1e7f
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSJussi Pohjolainen
 
Unit 2 (html)
Unit 2  (html)Unit 2  (html)
Unit 2 (html)manochitra10
 
Html xhtml tag-sheet
Html xhtml tag-sheetHtml xhtml tag-sheet
Html xhtml tag-sheetwihrbt
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & JavascriptDavid Lindkvist
 
Web I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionWeb I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionRandy Connolly
 
Html and Xhtml
Html and XhtmlHtml and Xhtml
Html and XhtmlChhom Karath
 
Session ii(html)
Session ii(html)Session ii(html)
Session ii(html)Shrijan Tiwari
 
Learning to run
Learning to runLearning to run
Learning to rundominion
 
Doing more with LESS
Doing more with LESSDoing more with LESS
Doing more with LESSjsmith92
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5www.netgains.org
 
Images and Lists in HTML
Images and Lists in HTMLImages and Lists in HTML
Images and Lists in HTMLMarlon Jamera
 
HTML Lists & Llinks
HTML Lists & LlinksHTML Lists & Llinks
HTML Lists & LlinksNisa Soomro
 

Was ist angesagt? (20)

HTML 101
HTML 101HTML 101
HTML 101
 
HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - Ebook
 
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
 
Origins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLOrigins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTML
 
Week 2 HTML lists, hyperlinks, tables, and images
Week 2 HTML lists, hyperlinks, tables, and imagesWeek 2 HTML lists, hyperlinks, tables, and images
Week 2 HTML lists, hyperlinks, tables, and images
 
Xhtml 2010
Xhtml 2010Xhtml 2010
Xhtml 2010
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSS
 
Unit 2 (html)
Unit 2  (html)Unit 2  (html)
Unit 2 (html)
 
Html xhtml tag-sheet
Html xhtml tag-sheetHtml xhtml tag-sheet
Html xhtml tag-sheet
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Web I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionWeb I - 02 - XHTML Introduction
Web I - 02 - XHTML Introduction
 
Html and Xhtml
Html and XhtmlHtml and Xhtml
Html and Xhtml
 
Session ii(html)
Session ii(html)Session ii(html)
Session ii(html)
 
Learning to run
Learning to runLearning to run
Learning to run
 
Doing more with LESS
Doing more with LESSDoing more with LESS
Doing more with LESS
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
Images and Lists in HTML
Images and Lists in HTMLImages and Lists in HTML
Images and Lists in HTML
 
Beginning html
Beginning  htmlBeginning  html
Beginning html
 
Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
 
HTML Lists & Llinks
HTML Lists & LlinksHTML Lists & Llinks
HTML Lists & Llinks
 

Andere mochten auch

Making money with Google's Adsense
Making money with Google's AdsenseMaking money with Google's Adsense
Making money with Google's AdsenseRay Villalobos
 
Online Advertising
Online AdvertisingOnline Advertising
Online AdvertisingRay Villalobos
 
Analytics essentials
Analytics essentialsAnalytics essentials
Analytics essentialsRay Villalobos
 
Building Semantic HTML tables
Building Semantic HTML tablesBuilding Semantic HTML tables
Building Semantic HTML tablesRay Villalobos
 
Understanding html
Understanding htmlUnderstanding html
Understanding htmlRay Villalobos
 
Social media fundamentals
Social media fundamentalsSocial media fundamentals
Social media fundamentalsRay Villalobos
 
CSS Fundamentals
CSS FundamentalsCSS Fundamentals
CSS FundamentalsRay Villalobos
 
Working with HTML Lists
Working with HTML ListsWorking with HTML Lists
Working with HTML ListsRay Villalobos
 

Andere mochten auch (9)

Doing business
Doing businessDoing business
Doing business
 
Making money with Google's Adsense
Making money with Google's AdsenseMaking money with Google's Adsense
Making money with Google's Adsense
 
Online Advertising
Online AdvertisingOnline Advertising
Online Advertising
 
Analytics essentials
Analytics essentialsAnalytics essentials
Analytics essentials
 
Building Semantic HTML tables
Building Semantic HTML tablesBuilding Semantic HTML tables
Building Semantic HTML tables
 
Understanding html
Understanding htmlUnderstanding html
Understanding html
 
Social media fundamentals
Social media fundamentalsSocial media fundamentals
Social media fundamentals
 
CSS Fundamentals
CSS FundamentalsCSS Fundamentals
CSS Fundamentals
 
Working with HTML Lists
Working with HTML ListsWorking with HTML Lists
Working with HTML Lists
 

Ähnlich wie Creating forms

Web forms in php
Web forms in phpWeb forms in php
Web forms in phpKamal Acharya
 
Web Application Development using PHP Chapter 5
Web Application Development using PHP Chapter 5Web Application Development using PHP Chapter 5
Web Application Development using PHP Chapter 5Mohd Harris Ahmad Jaal
 
Introduction to web development - HTML 5
Introduction to web development - HTML 5Introduction to web development - HTML 5
Introduction to web development - HTML 5Ayoub Ghozzi
 
Working with data.pptx
Working with data.pptxWorking with data.pptx
Working with data.pptxSherinRappai
 
forms.pptx
forms.pptxforms.pptx
forms.pptxasmabagersh
 
Chapter 9: Forms
Chapter 9: FormsChapter 9: Forms
Chapter 9: FormsSteve Guinan
 
Getting Information through HTML Forms
Getting Information through HTML FormsGetting Information through HTML Forms
Getting Information through HTML FormsMike Crabb
 
Web Development Course: PHP lecture 2
Web Development Course: PHP lecture 2Web Development Course: PHP lecture 2
Web Development Course: PHP lecture 2Gheyath M. Othman
 
Episode 14 - Basics of HTML for Salesforce
Episode 14 - Basics of HTML for SalesforceEpisode 14 - Basics of HTML for Salesforce
Episode 14 - Basics of HTML for SalesforceJitendra Zaa
 
HTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryHTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryFAKHRUN NISHA
 
Class 21
Class 21Class 21
Class 21Jiyeon Lee
 
Class 21
Class 21Class 21
Class 21Jiyeon Lee
 
W3Conf slides - The top web features from caniuse.com you can use today
W3Conf slides - The top web features from caniuse.com you can use todayW3Conf slides - The top web features from caniuse.com you can use today
W3Conf slides - The top web features from caniuse.com you can use todayadeveria
 

Ähnlich wie Creating forms (20)

Introduction to php web programming - get and post
Introduction to php  web programming - get and postIntroduction to php  web programming - get and post
Introduction to php web programming - get and post
 
Web forms in php
Web forms in phpWeb forms in php
Web forms in php
 
PHP - Introduction to PHP Forms
PHP - Introduction to PHP FormsPHP - Introduction to PHP Forms
PHP - Introduction to PHP Forms
 
Web Application Development using PHP Chapter 5
Web Application Development using PHP Chapter 5Web Application Development using PHP Chapter 5
Web Application Development using PHP Chapter 5
 
Introduction to web development - HTML 5
Introduction to web development - HTML 5Introduction to web development - HTML 5
Introduction to web development - HTML 5
 
PHP-04-Forms.ppt
PHP-04-Forms.pptPHP-04-Forms.ppt
PHP-04-Forms.ppt
 
Working with data.pptx
Working with data.pptxWorking with data.pptx
Working with data.pptx
 
forms.pptx
forms.pptxforms.pptx
forms.pptx
 
Chapter 9: Forms
Chapter 9: FormsChapter 9: Forms
Chapter 9: Forms
 
Getting Information through HTML Forms
Getting Information through HTML FormsGetting Information through HTML Forms
Getting Information through HTML Forms
 
Web Development Course: PHP lecture 2
Web Development Course: PHP lecture 2Web Development Course: PHP lecture 2
Web Development Course: PHP lecture 2
 
Cmsc 100 (web forms)
Cmsc 100 (web forms)Cmsc 100 (web forms)
Cmsc 100 (web forms)
 
Web 101
Web 101Web 101
Web 101
 
Episode 14 - Basics of HTML for Salesforce
Episode 14 - Basics of HTML for SalesforceEpisode 14 - Basics of HTML for Salesforce
Episode 14 - Basics of HTML for Salesforce
 
HTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryHTML/CSS/java Script/Jquery
HTML/CSS/java Script/Jquery
 
Class 21
Class 21Class 21
Class 21
 
Class 21
Class 21Class 21
Class 21
 
GET and POST in PHP
GET and POST in PHPGET and POST in PHP
GET and POST in PHP
 
W3Conf slides - The top web features from caniuse.com you can use today
W3Conf slides - The top web features from caniuse.com you can use todayW3Conf slides - The top web features from caniuse.com you can use today
W3Conf slides - The top web features from caniuse.com you can use today
 
Html5
Html5Html5
Html5
 

KĂźrzlich hochgeladen

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

KĂźrzlich hochgeladen (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Creating forms

  • 1. CREATING FORMS by Ray Villalobos
  • 3. WHAT ARE FORMS? • Create interactions with server
  • 4. WHAT ARE FORMS? • Create interactions with server • Compound tag
  • 5. WHAT ARE FORMS? • Create interactions with server • Compound tag • Accept user input in various ways
  • 6. FORM TAG <form action="formprocessor.php"> First name: <input type="text" name="fname"><br> <input type="submit"> </form>
  • 7. FORM TAG <form action="formprocessor.php"> First name: <input type="text" name="fname"><br> <input type="submit"> </form> • Action Parameters tells browser where to send data
  • 8. FORM TAG <form action="formprocessor.php"> First name: <input type="text" name="fname"><br> <input type="submit"> </form> • Action Parameters tells browser where to send data • Method tells browser to pass data as URL (GET) or in the background(POST)
  • 9. FORM TAG <form action="formprocessor.php"> First name: <input type="text" name="fname"><br> <input type="submit"> </form> • Action Parameters tells browser where to send data • Method tells browser to pass data as URL (GET) or in the background(POST) • Enctype species how to encode the data
  • 11. THE GET METHOD • Passes data as a URL
  • 12. THE GET METHOD • Passes data as a URL • Name/Value Pairs (? then name=values separated by &)
  • 13. THE GET METHOD • Passes data as a URL • Name/Value Pairs (? then name=values separated by &) • Useful for bookmarking
  • 14. THE GET METHOD • Passes data as a URL • Name/Value Pairs (? then name=values separated by &) • Useful for bookmarking • Limit to how much you can place in URL
  • 15. THE GET METHOD • Passes data as a URL • Name/Value Pairs (? then name=values separated by &) • Useful for bookmarking • Limit to how much you can place in URL • Not for sensitive info
  • 17. THE POST METHOD • Sends the data as an HTTP transaction
  • 18. THE POST METHOD • Sends the data as an HTTP transaction • Cannot be bookmarked
  • 19. THE POST METHOD • Sends the data as an HTTP transaction • Cannot be bookmarked • More secure than GET
  • 20. THE POST METHOD • Sends the data as an HTTP transaction • Cannot be bookmarked • More secure than GET • Does not have size limitations
  • 21. ENCTYPE Value Description Default. Characters encoded before sent (spaces converted to application/x-www-form-urlencoded "+" symbols, special characters converted to ASCII/HEX) multipart/form-data No characters are encoded. Required for file uploads text/plain Spaces are converted to "+" symbols, nothing else
  • 22. ENCTYPE • Denes now form data is encoded for sending to server Value Description Default. Characters encoded before sent (spaces converted to application/x-www-form-urlencoded "+" symbols, special characters converted to ASCII/HEX) multipart/form-data No characters are encoded. Required for file uploads text/plain Spaces are converted to "+" symbols, nothing else
  • 23. ENCTYPE • Denes now form data is encoded for sending to server • Only needed if method is POST Value Description Default. Characters encoded before sent (spaces converted to application/x-www-form-urlencoded "+" symbols, special characters converted to ASCII/HEX) multipart/form-data No characters are encoded. Required for file uploads text/plain Spaces are converted to "+" symbols, nothing else
  • 24. ENCTYPE • Denes now form data is encoded for sending to server • Only needed if method is POST • Can be one of three Value Description Default. Characters encoded before sent (spaces converted to application/x-www-form-urlencoded "+" symbols, special characters converted to ASCII/HEX) multipart/form-data No characters are encoded. Required for file uploads text/plain Spaces are converted to "+" symbols, nothing else
  • 25. INPUT name: <input name="fname"><br />
  • 26. INPUT name: <input name="fname"><br /> • Most common and versatile form element
  • 27. INPUT name: <input name="fname"><br /> • Most common and versatile form element • Manydifferent types: text, checkbox, password, radio, le, hidden, image, submit, reset,
  • 28. INPUT name: <input name="fname"><br /> • Most common and versatile form element • Manydifferent types: text, checkbox, password, radio, le, hidden, image, submit, reset, • HTML5 & Mobile: color, date, datetime, datetime-local, email, month, number, range, search, tel, time, url, week
  • 30. COMMON INPUT ATTRIBUTES • name/value: the name and values that will be sent to the action URL
  • 31. COMMON INPUT ATTRIBUTES • name/value: the name and values that will be sent to the action URL • checked: on checkboxes/radio buttons, this displays checkbox or radio as pre-selected
  • 32. COMMON INPUT ATTRIBUTES • name/value: the name and values that will be sent to the action URL • checked: on checkboxes/radio buttons, this displays checkbox or radio as pre-selected • src: on input type image the URL of the image
  • 33. COMMON INPUT ATTRIBUTES • name/value: the name and values that will be sent to the action URL • checked: on checkboxes/radio buttons, this displays checkbox or radio as pre-selected • src: on input type image the URL of the image • HTML5: autofocus, autocomplete, placeholder, required
  • 34. LABEL <label for="myname">Male</label> <input id="myname" name="name" /><br>
  • 35. LABEL <label for="myname">Male</label> <input id="myname" name="name" /><br> • Every eld should have a label
  • 36. LABEL <label for="myname">Male</label> <input id="myname" name="name" /><br> • Every eld should have a label • Helps with Usability, mobile devices
  • 37. LABEL <label for="myname">Male</label> <input id="myname" name="name" /><br> • Every eld should have a label • Helps with Usability, mobile devices • for attribute ties the text to the input eld
  • 38. LABEL <label for="myname">Male</label> <input id="myname" name="name" /><br> • Every eld should have a label • Helps with Usability, mobile devices • for attribute ties the text to the input eld • Makes label activate input eld
  • 39. TEXTAREA <textarea name="comments" rows="4" cols="50"></textarea>
  • 40. TEXTAREA <textarea name="comments" rows="4" cols="50"></textarea> • Multi line text input
  • 41. TEXTAREA <textarea name="comments" rows="4" cols="50"></textarea> • Multi line text input • Beginning and end tag.
  • 42. TEXTAREA <textarea name="comments" rows="4" cols="50"></textarea> • Multi line text input • Beginning and end tag. • maxlength: max # of characters allowed
  • 43. TEXTAREA <textarea name="comments" rows="4" cols="50"></textarea> • Multi line text input • Beginning and end tag. • maxlength: max # of characters allowed • Youcan use the rows and cols attribute, but usually better to dene size with CSS.
  • 44. SELECT <select name="referral"> <option>Choose...</option> <option value="fb">Facebook</option> </select>
  • 45. SELECT <select name="referral"> <option>Choose...</option> <option value="fb">Facebook</option> </select> • Drop down list
  • 46. SELECT <select name="referral"> <option>Choose...</option> <option value="fb">Facebook</option> </select> • Drop down list • <option> tags dene individual options for dropdown
  • 47. SELECT <select name="referral"> <option>Choose...</option> <option value="fb">Facebook</option> </select> • Drop down list • <option> tags dene individual options for dropdown • Name within <option> is label, not value
  • 48. SELECT <select name="referral"> <option>Choose...</option> <option value="fb">Facebook</option> </select> • Drop down list • <option> tags dene individual options for dropdown • Name within <option> is label, not value • Value attribute on option tag sends value to action URL with name from select tag.
  • 49. SELECT <select name="referral"> <option>Choose...</option> <option value="fb">Facebook</option> </select> • Drop down list • <option> tags dene individual options for dropdown • Name within <option> is label, not value • Value attribute on option tag sends value to action URL with name from select tag. • Multiple attribute lets you select multiple items at once
  • 50. BUTTON <button type="button">Click Me!</button>
  • 51. BUTTON <button type="button">Click Me!</button> •A clickable button
  • 52. BUTTON <button type="button">Click Me!</button> •A clickable button • Almost exactly like input type=submit
  • 53. BUTTON <button type="button">Click Me!</button> •A clickable button • Almost exactly like input type=submit • type can be button, reset or submit
  • 54. BUTTON <button type="button">Click Me!</button> •A clickable button • Almost exactly like input type=submit • type can be button, reset or submit • Can use outside of forms
  • 56. FIELDSET • Groups form elements togethers
  • 57. FIELDSET • Groups form elements togethers • Drawsa box around related elements in most browsers
  • 58. FIELDSET • Groups form elements togethers • Drawsa box around related elements in most browsers • Youuse the <legend> tag to dene the eldset's title

Hinweis der Redaktion

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n