SlideShare a Scribd company logo
1 of 32
Download to read offline
FEWD - WEEK 8
WILL MYERS
Freelance Front End Developer
SLIDES
http://www.slideshare.net/wilkom/fewd-week8-slides
FINAL PROJECT MILESTONE 3
By week 8, you should have submitted a draft of the
JavaScript and jQuery you'll need for your final project. This
week, focus iterating on your project to turn in an updated
draft.
YOUR WEEKLY FEWD GITHUB
REPOSITORY
Use the '+' button in the top-left of GitHub Desktop
(Create tab)
Create a new repository called 'FEWD_Week8'
Choose the [home]/FEWD folder for the local path
Open this repo folder in your editor
Commit the changes and publish the FEWD_Week8
repository to github.com
YOUR WEEKLY WORKING FILES
FROM ME
To get the week8_working_files you should just be able to
select the ga-fewd-files repository in GitHub Desktop and
press 'Sync'. This should pull in this weeks folder from
github.com.
If you any difficulties you should just re-clone the ga-fewd-
files repository.
Copy the whole week8_working_files into your FEWD_Week8
repository and commit and publish to github.com
REVIEW OF LAST WEEK'S
ASSIGNMENT
See also http://learn.shayhowe.com/advanced-html-
css/responsive-web-design/
FORMS
How we can get data from users?
FORMS
A wrapper for data collection elements
Text fields
Dropdowns
Radio Buttons
etc
FORMS
Tells the page:
Where to send the data
How to send it
What is being sent
FORMS - EXERCISE
https://developer.mozilla.org/en-
US/docs/Web/Guide/HTML/Forms/My_first_HTML_form
FORM TAG
Available Attributes
Method: Get, Post, Put, Delete
Action: Url to send data to
Enctype: 'multipart/form-data' if uploading files
FORM TAG
In Action
<form action="register.php" method="post" enctype="multipart/form-data"
<!--Data collection elements go here-->
</form>
INPUTS
Place between <form> </form>tags
Attributes
type: text, submit, password, email, checkbox, button,
radio, file, number, search, etc
name: used server side
placeholder
value
https://developer.mozilla.org/en-
US/docs/Web/HTML/Element/input
INPUTS
Gotchas
The font-family for an input is not inherited!!!
This can lead to funny sizing issues on Macs vs. PCs
where the default font is not the same
TEXT
Use the valueattribute to set initial text
Use the placeholderattribute to set placeholder text
EMAIL
Allows browser to autofill field
PASSWORD
Hides characters as typed
SUBMIT VS FILE VS BUTTON
valueis button text. Defaults to submit in chrome:
<input type="submit" value="Submit">
Creates a file upload element <input type="file">
Creates clickable button <input type="button">
SELECT AND OPTION
SELECT AND OPTION
The <select>tag is for dropdowns and contains
<option>s.
<select>
<option value="option1">first</option>
<option value="option2">second</option>
<select>
The valueattribute represents the value to be submitted
with the form, should this option be selected. If this
attribute is omitted, the value is taken from the text content
of the option element.
<option>first</option> <!-- value is "first" -->
LABELS
Information about the input field should be put in a
<label>tag
To tie the two together choose one of these methods:
<label>Name <input type="text" name="yourName"></label>
<label for="yourName">Name</label>
<input type="text" name="yourName" id="yourName">
NB Usability: Clicking the label text in either case places the
focus in the input field (great for radio buttons)
FIELDSET/LEGEND
<fieldset>is a wrapper for grouped form elements, e.g.
'first', 'middle', 'last' name text fields.
<legend>goes inside fieldset and defines the grouping
term for the fieldset
<fieldset>
<legend>Your Name</legend>
<input type="text" name="first_name">
<input type="text" name="middle_name">
<input type="text" name="last_name">
</fieldset>
STYLING
Styling forms is tricky because form widgets were originally
built to use the underlying operating system UI. CSS was
added for styling other elements some years later.
For a good summary on styling forms, read the following:
https://developer.mozilla.org/en-
US/docs/Web/Guide/HTML/Forms/Styling_HTML_forms
STYLING
The following forms elements are straightforward to style in
the same way that you would style a <p>or a <div>or a
<nav>:
<form>
<fieldset>
<label>
<output>
all text field widgets e.g. (<input>or <textarea>)
all buttons ('submit', 'reset', 'button')
STYLING WORKAROUNDS
The following form elements cannot be styled directly with
CSS
Checkboxes
File upload inputs
Radio buttons
STYLING WORKAROUNDS
There are a number of workarounds for styling 'bad' and
'ugly' form elements
Opacity 0 on the element, set its height and width to
define clickable area, set the height and width of its
parent to be the same as the input (don't forget position
relative). Style the parent.
Hide the element, style a corresponding label how you
wanted the element to appear
STYLING WORKAROUNDS
Try using pseudo elements and the selector :checked for
'no-JS' switching between checked and unchecked
images used for styling
Use JavaScript
STYLING WORKAROUNDS
Let's read the following article and then build a custom
styled checkbox group using one of the techniques from the
previous slide:
https://developer.mozilla.org/en-
US/docs/Web/Guide/HTML/Forms/Advanced_styling_for_HTML
STYLING
Let's have a look at a styled form with a styled <select>
widget, using the following properties to override any
default UI appearance:
appearance:none;
-webkit-appearance:none;
-moz-appearance: none;
Open week8_working_files/form_style
STYLING
Now complete the on the
Mozilla web page.
postcard form styling exercise
VALIDATION
Validation occurs on both the front end and the back end.
The front-end can check for whether a field has been left
blank and whether your password confirmation matches
your password.
Can you write some JavaScript to perform simple validation
for one of the forms we have looked at?
VALIDATION LIBRARIES
Parsley.js is a third party JavaScript library that you can use
for more rigorous front-end validation. It works with jQuery.
http://parsleyjs.org/
http://parsleyjs.org/doc/index.html#psly-frontend-form-
validation
Open week8_working_files/form_style_validation
TODO LIST EXERCISE
Open week8_working_files/to_do_list

More Related Content

What's hot

Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationLotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationSean Burgess
 
Creating Acessible floating labels
Creating Acessible floating labelsCreating Acessible floating labels
Creating Acessible floating labelsRuss Weakley
 
Unit f adobe dreamweaver cs6
Unit f adobe dreamweaver cs6Unit f adobe dreamweaver cs6
Unit f adobe dreamweaver cs6Krista Lawrence
 
Baawjsajq109
Baawjsajq109Baawjsajq109
Baawjsajq109Thinkful
 
Access tips access and sql part 4 building select queries on-the-fly
Access tips  access and sql part 4  building select queries on-the-flyAccess tips  access and sql part 4  building select queries on-the-fly
Access tips access and sql part 4 building select queries on-the-flyquest2900
 
Revit drafting procedure
Revit drafting procedureRevit drafting procedure
Revit drafting procedureAnima M C
 
Web app-la-jan-2
Web app-la-jan-2Web app-la-jan-2
Web app-la-jan-2Thinkful
 
Writing a blog post (edublogs)
Writing a blog post (edublogs)Writing a blog post (edublogs)
Writing a blog post (edublogs)Paul L
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5ketanraval
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5Ketan Raval
 
Learn CSS From Scratch
Learn CSS From ScratchLearn CSS From Scratch
Learn CSS From Scratchecobold
 
Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18Thinkful
 
Nvu tutorial1 1
Nvu tutorial1 1Nvu tutorial1 1
Nvu tutorial1 1RJOROZCO
 
Using Wordpress with Reclaim Hosting
Using Wordpress with Reclaim HostingUsing Wordpress with Reclaim Hosting
Using Wordpress with Reclaim HostingCindy Royal
 
Blog Tutorial
Blog TutorialBlog Tutorial
Blog Tutorialalancarr
 

What's hot (20)

forms
formsforms
forms
 
Fewd week2 slides
Fewd week2 slidesFewd week2 slides
Fewd week2 slides
 
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationLotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
 
Creating Acessible floating labels
Creating Acessible floating labelsCreating Acessible floating labels
Creating Acessible floating labels
 
Unit f adobe dreamweaver cs6
Unit f adobe dreamweaver cs6Unit f adobe dreamweaver cs6
Unit f adobe dreamweaver cs6
 
Baawjsajq109
Baawjsajq109Baawjsajq109
Baawjsajq109
 
Using class suffixes
Using class suffixesUsing class suffixes
Using class suffixes
 
Access tips access and sql part 4 building select queries on-the-fly
Access tips  access and sql part 4  building select queries on-the-flyAccess tips  access and sql part 4  building select queries on-the-fly
Access tips access and sql part 4 building select queries on-the-fly
 
Revit drafting procedure
Revit drafting procedureRevit drafting procedure
Revit drafting procedure
 
Web app-la-jan-2
Web app-la-jan-2Web app-la-jan-2
Web app-la-jan-2
 
Writing a blog post (edublogs)
Writing a blog post (edublogs)Writing a blog post (edublogs)
Writing a blog post (edublogs)
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
 
Learn CSS From Scratch
Learn CSS From ScratchLearn CSS From Scratch
Learn CSS From Scratch
 
Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18
 
Nvu tutorial1 1
Nvu tutorial1 1Nvu tutorial1 1
Nvu tutorial1 1
 
Deck 6-456 (1)
Deck 6-456 (1)Deck 6-456 (1)
Deck 6-456 (1)
 
Using Wordpress with Reclaim Hosting
Using Wordpress with Reclaim HostingUsing Wordpress with Reclaim Hosting
Using Wordpress with Reclaim Hosting
 
Blog Tutorial
Blog TutorialBlog Tutorial
Blog Tutorial
 
Knockout in action
Knockout in actionKnockout in action
Knockout in action
 

Viewers also liked

trabajo informática
trabajo informáticatrabajo informática
trabajo informáticaVicentClaudia
 
Trabajo de Informática
Trabajo de InformáticaTrabajo de Informática
Trabajo de InformáticaVicentClaudia
 
Los sistemas operativos y sus creadores
Los sistemas operativos y sus creadoresLos sistemas operativos y sus creadores
Los sistemas operativos y sus creadoresVicentClaudia
 
Fabricantes y sistemas operativos
Fabricantes y sistemas operativosFabricantes y sistemas operativos
Fabricantes y sistemas operativosarianator292108
 
Creadores de los sistemas operativos
Creadores de los sistemas operativosCreadores de los sistemas operativos
Creadores de los sistemas operativosrosarivasruiz
 
Sistemas operativos según el fabricante (microsoft,
Sistemas operativos según el fabricante (microsoft,Sistemas operativos según el fabricante (microsoft,
Sistemas operativos según el fabricante (microsoft,James Jim Root
 

Viewers also liked (7)

trabajo informática
trabajo informáticatrabajo informática
trabajo informática
 
La nanotecnologia
La nanotecnologiaLa nanotecnologia
La nanotecnologia
 
Trabajo de Informática
Trabajo de InformáticaTrabajo de Informática
Trabajo de Informática
 
Los sistemas operativos y sus creadores
Los sistemas operativos y sus creadoresLos sistemas operativos y sus creadores
Los sistemas operativos y sus creadores
 
Fabricantes y sistemas operativos
Fabricantes y sistemas operativosFabricantes y sistemas operativos
Fabricantes y sistemas operativos
 
Creadores de los sistemas operativos
Creadores de los sistemas operativosCreadores de los sistemas operativos
Creadores de los sistemas operativos
 
Sistemas operativos según el fabricante (microsoft,
Sistemas operativos según el fabricante (microsoft,Sistemas operativos según el fabricante (microsoft,
Sistemas operativos según el fabricante (microsoft,
 

Similar to Fewd week8 slides

Cis407 a ilab 2 web application development devry university
Cis407 a ilab 2 web application development devry universityCis407 a ilab 2 web application development devry university
Cis407 a ilab 2 web application development devry universitylhkslkdh89009
 
HTML Foundations, pt 3: Forms
HTML Foundations, pt 3: FormsHTML Foundations, pt 3: Forms
HTML Foundations, pt 3: FormsShawn Calvert
 
Rational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORSRational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORSGEBS Reporting
 
SYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECTSYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECTSanjay Saluth
 
Introduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and JqueryIntroduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and Jqueryvaluebound
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuerySeble Nigussie
 
Using prime[31] to connect your unity game to azure mobile services
Using prime[31] to connect your unity game to azure mobile servicesUsing prime[31] to connect your unity game to azure mobile services
Using prime[31] to connect your unity game to azure mobile servicesDavid Voyles
 
Streamlining React Component Development and Sharing with bit.pptx
Streamlining React Component Development and Sharing with bit.pptxStreamlining React Component Development and Sharing with bit.pptx
Streamlining React Component Development and Sharing with bit.pptxShubhamJayswal6
 
CSS Pseudo Elements.pdf
CSS Pseudo Elements.pdfCSS Pseudo Elements.pdf
CSS Pseudo Elements.pdfsonu kumar
 
Prep 2-booklet-2nd-term-2016-2017
Prep 2-booklet-2nd-term-2016-2017Prep 2-booklet-2nd-term-2016-2017
Prep 2-booklet-2nd-term-2016-2017khawagah
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms TutorialProdigyView
 
Documentation For Tab Setup
Documentation For Tab SetupDocumentation For Tab Setup
Documentation For Tab Setupvkeeton
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAhsanul Karim
 

Similar to Fewd week8 slides (20)

Cis407 a ilab 2 web application development devry university
Cis407 a ilab 2 web application development devry universityCis407 a ilab 2 web application development devry university
Cis407 a ilab 2 web application development devry university
 
HTML Foundations, pt 3: Forms
HTML Foundations, pt 3: FormsHTML Foundations, pt 3: Forms
HTML Foundations, pt 3: Forms
 
forms
formsforms
forms
 
Rational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORSRational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORS
 
SYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECTSYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECT
 
Introduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and JqueryIntroduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and Jquery
 
Mca 504 dotnet_unit5
Mca 504 dotnet_unit5Mca 504 dotnet_unit5
Mca 504 dotnet_unit5
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
Dojo1.0_Tutorials
Dojo1.0_TutorialsDojo1.0_Tutorials
Dojo1.0_Tutorials
 
Dojo1.0_Tutorials
Dojo1.0_TutorialsDojo1.0_Tutorials
Dojo1.0_Tutorials
 
Using prime[31] to connect your unity game to azure mobile services
Using prime[31] to connect your unity game to azure mobile servicesUsing prime[31] to connect your unity game to azure mobile services
Using prime[31] to connect your unity game to azure mobile services
 
Streamlining React Component Development and Sharing with bit.pptx
Streamlining React Component Development and Sharing with bit.pptxStreamlining React Component Development and Sharing with bit.pptx
Streamlining React Component Development and Sharing with bit.pptx
 
CSS Pseudo Elements.pdf
CSS Pseudo Elements.pdfCSS Pseudo Elements.pdf
CSS Pseudo Elements.pdf
 
Prep 2-booklet-2nd-term-2016-2017
Prep 2-booklet-2nd-term-2016-2017Prep 2-booklet-2nd-term-2016-2017
Prep 2-booklet-2nd-term-2016-2017
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
Documentation For Tab Setup
Documentation For Tab SetupDocumentation For Tab Setup
Documentation For Tab Setup
 
Ch01
Ch01Ch01
Ch01
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form Widgets
 
Chapter 01
Chapter 01Chapter 01
Chapter 01
 
J Query Public
J Query PublicJ Query Public
J Query Public
 

More from William Myers

More from William Myers (6)

Fewd week6 slides
Fewd week6 slidesFewd week6 slides
Fewd week6 slides
 
Fewd week5 slides
Fewd week5 slidesFewd week5 slides
Fewd week5 slides
 
Fewd week4 slides
Fewd week4 slidesFewd week4 slides
Fewd week4 slides
 
Fewd week3 slides
Fewd week3 slidesFewd week3 slides
Fewd week3 slides
 
Fewd week1 slides
Fewd week1 slidesFewd week1 slides
Fewd week1 slides
 
Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
 

Recently uploaded

Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneCall girls in Ahmedabad High profile
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our EscortsCall Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escortsindian call girls near you
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Personfurqan222004
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of indiaimessage0108
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 

Recently uploaded (20)

Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our EscortsCall Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Person
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of india
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 

Fewd week8 slides

  • 1. FEWD - WEEK 8 WILL MYERS Freelance Front End Developer SLIDES http://www.slideshare.net/wilkom/fewd-week8-slides
  • 2. FINAL PROJECT MILESTONE 3 By week 8, you should have submitted a draft of the JavaScript and jQuery you'll need for your final project. This week, focus iterating on your project to turn in an updated draft.
  • 3. YOUR WEEKLY FEWD GITHUB REPOSITORY Use the '+' button in the top-left of GitHub Desktop (Create tab) Create a new repository called 'FEWD_Week8' Choose the [home]/FEWD folder for the local path Open this repo folder in your editor Commit the changes and publish the FEWD_Week8 repository to github.com
  • 4. YOUR WEEKLY WORKING FILES FROM ME To get the week8_working_files you should just be able to select the ga-fewd-files repository in GitHub Desktop and press 'Sync'. This should pull in this weeks folder from github.com. If you any difficulties you should just re-clone the ga-fewd- files repository. Copy the whole week8_working_files into your FEWD_Week8 repository and commit and publish to github.com
  • 5. REVIEW OF LAST WEEK'S ASSIGNMENT See also http://learn.shayhowe.com/advanced-html- css/responsive-web-design/
  • 6. FORMS How we can get data from users?
  • 7. FORMS A wrapper for data collection elements Text fields Dropdowns Radio Buttons etc
  • 8. FORMS Tells the page: Where to send the data How to send it What is being sent
  • 10. FORM TAG Available Attributes Method: Get, Post, Put, Delete Action: Url to send data to Enctype: 'multipart/form-data' if uploading files
  • 11. FORM TAG In Action <form action="register.php" method="post" enctype="multipart/form-data" <!--Data collection elements go here--> </form>
  • 12. INPUTS Place between <form> </form>tags Attributes type: text, submit, password, email, checkbox, button, radio, file, number, search, etc name: used server side placeholder value https://developer.mozilla.org/en- US/docs/Web/HTML/Element/input
  • 13. INPUTS Gotchas The font-family for an input is not inherited!!! This can lead to funny sizing issues on Macs vs. PCs where the default font is not the same
  • 14. TEXT Use the valueattribute to set initial text Use the placeholderattribute to set placeholder text
  • 15. EMAIL Allows browser to autofill field
  • 17. SUBMIT VS FILE VS BUTTON valueis button text. Defaults to submit in chrome: <input type="submit" value="Submit"> Creates a file upload element <input type="file"> Creates clickable button <input type="button">
  • 19. SELECT AND OPTION The <select>tag is for dropdowns and contains <option>s. <select> <option value="option1">first</option> <option value="option2">second</option> <select> The valueattribute represents the value to be submitted with the form, should this option be selected. If this attribute is omitted, the value is taken from the text content of the option element. <option>first</option> <!-- value is "first" -->
  • 20. LABELS Information about the input field should be put in a <label>tag To tie the two together choose one of these methods: <label>Name <input type="text" name="yourName"></label> <label for="yourName">Name</label> <input type="text" name="yourName" id="yourName"> NB Usability: Clicking the label text in either case places the focus in the input field (great for radio buttons)
  • 21. FIELDSET/LEGEND <fieldset>is a wrapper for grouped form elements, e.g. 'first', 'middle', 'last' name text fields. <legend>goes inside fieldset and defines the grouping term for the fieldset <fieldset> <legend>Your Name</legend> <input type="text" name="first_name"> <input type="text" name="middle_name"> <input type="text" name="last_name"> </fieldset>
  • 22. STYLING Styling forms is tricky because form widgets were originally built to use the underlying operating system UI. CSS was added for styling other elements some years later. For a good summary on styling forms, read the following: https://developer.mozilla.org/en- US/docs/Web/Guide/HTML/Forms/Styling_HTML_forms
  • 23. STYLING The following forms elements are straightforward to style in the same way that you would style a <p>or a <div>or a <nav>: <form> <fieldset> <label> <output> all text field widgets e.g. (<input>or <textarea>) all buttons ('submit', 'reset', 'button')
  • 24. STYLING WORKAROUNDS The following form elements cannot be styled directly with CSS Checkboxes File upload inputs Radio buttons
  • 25. STYLING WORKAROUNDS There are a number of workarounds for styling 'bad' and 'ugly' form elements Opacity 0 on the element, set its height and width to define clickable area, set the height and width of its parent to be the same as the input (don't forget position relative). Style the parent. Hide the element, style a corresponding label how you wanted the element to appear
  • 26. STYLING WORKAROUNDS Try using pseudo elements and the selector :checked for 'no-JS' switching between checked and unchecked images used for styling Use JavaScript
  • 27. STYLING WORKAROUNDS Let's read the following article and then build a custom styled checkbox group using one of the techniques from the previous slide: https://developer.mozilla.org/en- US/docs/Web/Guide/HTML/Forms/Advanced_styling_for_HTML
  • 28. STYLING Let's have a look at a styled form with a styled <select> widget, using the following properties to override any default UI appearance: appearance:none; -webkit-appearance:none; -moz-appearance: none; Open week8_working_files/form_style
  • 29. STYLING Now complete the on the Mozilla web page. postcard form styling exercise
  • 30. VALIDATION Validation occurs on both the front end and the back end. The front-end can check for whether a field has been left blank and whether your password confirmation matches your password. Can you write some JavaScript to perform simple validation for one of the forms we have looked at?
  • 31. VALIDATION LIBRARIES Parsley.js is a third party JavaScript library that you can use for more rigorous front-end validation. It works with jQuery. http://parsleyjs.org/ http://parsleyjs.org/doc/index.html#psly-frontend-form- validation Open week8_working_files/form_style_validation
  • 32. TODO LIST EXERCISE Open week8_working_files/to_do_list