SlideShare a Scribd company logo
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 (20)

forms
formsforms
forms
tutorialsruby
 
Fewd week2 slides
Fewd week2 slidesFewd week2 slides
Fewd week2 slides
William Myers
 
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
Sean Burgess
 
Creating Acessible floating labels
Creating Acessible floating labelsCreating Acessible floating labels
Creating Acessible floating labels
Russ Weakley
 
Unit f adobe dreamweaver cs6
Unit f adobe dreamweaver cs6Unit f adobe dreamweaver cs6
Unit f adobe dreamweaver cs6
Krista Lawrence
 
Baawjsajq109
Baawjsajq109Baawjsajq109
Baawjsajq109
Thinkful
 
Using class suffixes
Using class suffixesUsing class suffixes
Using class suffixes
shailendra vishwakarma
 
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
quest2900
 
Revit drafting procedure
Revit drafting procedureRevit drafting procedure
Revit drafting procedure
Anima M C
 
Web app-la-jan-2
Web app-la-jan-2Web app-la-jan-2
Web app-la-jan-2
Thinkful
 
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-5
ketanraval
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
Ketan Raval
 
Learn CSS From Scratch
Learn CSS From ScratchLearn CSS From Scratch
Learn CSS From Scratch
ecobold
 
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
Thinkful
 
Nvu tutorial1 1
Nvu tutorial1 1Nvu tutorial1 1
Nvu tutorial1 1
RJOROZCO
 
Deck 6-456 (1)
Deck 6-456 (1)Deck 6-456 (1)
Deck 6-456 (1)
Justin Ezor
 
Using Wordpress with Reclaim Hosting
Using Wordpress with Reclaim HostingUsing Wordpress with Reclaim Hosting
Using Wordpress with Reclaim Hosting
Cindy Royal
 
Blog Tutorial
Blog TutorialBlog Tutorial
Blog Tutorial
alancarr
 
Knockout in action
Knockout in actionKnockout in action
Knockout in action
Gerardo Leyes
 
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
Sean Burgess
 
Creating Acessible floating labels
Creating Acessible floating labelsCreating Acessible floating labels
Creating Acessible floating labels
Russ Weakley
 
Unit f adobe dreamweaver cs6
Unit f adobe dreamweaver cs6Unit f adobe dreamweaver cs6
Unit f adobe dreamweaver cs6
Krista Lawrence
 
Baawjsajq109
Baawjsajq109Baawjsajq109
Baawjsajq109
Thinkful
 
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
quest2900
 
Revit drafting procedure
Revit drafting procedureRevit drafting procedure
Revit drafting procedure
Anima M C
 
Web app-la-jan-2
Web app-la-jan-2Web app-la-jan-2
Web app-la-jan-2
Thinkful
 
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-5
ketanraval
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
Ketan Raval
 
Learn CSS From Scratch
Learn CSS From ScratchLearn CSS From Scratch
Learn CSS From Scratch
ecobold
 
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
Thinkful
 
Nvu tutorial1 1
Nvu tutorial1 1Nvu tutorial1 1
Nvu tutorial1 1
RJOROZCO
 
Using Wordpress with Reclaim Hosting
Using Wordpress with Reclaim HostingUsing Wordpress with Reclaim Hosting
Using Wordpress with Reclaim Hosting
Cindy Royal
 
Blog Tutorial
Blog TutorialBlog Tutorial
Blog Tutorial
alancarr
 

Viewers also liked (7)

trabajo informática
trabajo informáticatrabajo informática
trabajo informática
VicentClaudia
 
La nanotecnologia
La nanotecnologiaLa nanotecnologia
La nanotecnologia
arianator292108
 
Trabajo de Informática
Trabajo de InformáticaTrabajo de Informática
Trabajo de Informática
VicentClaudia
 
Los sistemas operativos y sus creadores
Los sistemas operativos y sus creadoresLos sistemas operativos y sus creadores
Los sistemas operativos y sus creadores
VicentClaudia
 
Fabricantes y sistemas operativos
Fabricantes y sistemas operativosFabricantes y sistemas operativos
Fabricantes y sistemas operativos
arianator292108
 
Creadores de los sistemas operativos
Creadores de los sistemas operativosCreadores de los sistemas operativos
Creadores de los sistemas operativos
rosarivasruiz
 
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
 
trabajo informática
trabajo informáticatrabajo informática
trabajo informática
VicentClaudia
 
Trabajo de Informática
Trabajo de InformáticaTrabajo de Informática
Trabajo de Informática
VicentClaudia
 
Los sistemas operativos y sus creadores
Los sistemas operativos y sus creadoresLos sistemas operativos y sus creadores
Los sistemas operativos y sus creadores
VicentClaudia
 
Fabricantes y sistemas operativos
Fabricantes y sistemas operativosFabricantes y sistemas operativos
Fabricantes y sistemas operativos
arianator292108
 
Creadores de los sistemas operativos
Creadores de los sistemas operativosCreadores de los sistemas operativos
Creadores de los sistemas operativos
rosarivasruiz
 
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
 

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
lhkslkdh89009
 
HTML Foundations, pt 3: Forms
HTML Foundations, pt 3: FormsHTML Foundations, pt 3: Forms
HTML Foundations, pt 3: Forms
Shawn Calvert
 
forms
formsforms
forms
tutorialsruby
 
Rational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORSRational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORS
GEBS Reporting
 
SYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECTSYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECT
Sanjay 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 Jquery
valuebound
 
Mca 504 dotnet_unit5
Mca 504 dotnet_unit5Mca 504 dotnet_unit5
Mca 504 dotnet_unit5
Rai Saheb Bhanwar Singh College Nasrullaganj
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
Seble Nigussie
 
Dojo1.0_Tutorials
Dojo1.0_TutorialsDojo1.0_Tutorials
Dojo1.0_Tutorials
tutorialsruby
 
Dojo1.0_Tutorials
Dojo1.0_TutorialsDojo1.0_Tutorials
Dojo1.0_Tutorials
tutorialsruby
 
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
David 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.pptx
ShubhamJayswal6
 
CSS Pseudo Elements.pdf
CSS Pseudo Elements.pdfCSS Pseudo Elements.pdf
CSS Pseudo Elements.pdf
sonu 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-2017
khawagah
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
ProdigyView
 
Documentation For Tab Setup
Documentation For Tab SetupDocumentation For Tab Setup
Documentation For Tab Setup
vkeeton
 
Ch01
Ch01Ch01
Ch01
guest7a6cbb3
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form Widgets
Ahsanul Karim
 
Chapter 01
Chapter 01Chapter 01
Chapter 01
Terry Yoast
 
J Query Public
J Query PublicJ Query Public
J Query Public
pradeepsilamkoti
 
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
lhkslkdh89009
 
HTML Foundations, pt 3: Forms
HTML Foundations, pt 3: FormsHTML Foundations, pt 3: Forms
HTML Foundations, pt 3: Forms
Shawn Calvert
 
Rational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORSRational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORS
GEBS Reporting
 
SYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECTSYSTEMS DESIGN / CAPSTONE PROJECT
SYSTEMS DESIGN / CAPSTONE PROJECT
Sanjay 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 Jquery
valuebound
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
Seble 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 services
David 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.pptx
ShubhamJayswal6
 
CSS Pseudo Elements.pdf
CSS Pseudo Elements.pdfCSS Pseudo Elements.pdf
CSS Pseudo Elements.pdf
sonu 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-2017
khawagah
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
ProdigyView
 
Documentation For Tab Setup
Documentation For Tab SetupDocumentation For Tab Setup
Documentation For Tab Setup
vkeeton
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form Widgets
Ahsanul Karim
 

More from William Myers (6)

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

Recently uploaded (19)

5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)
APNIC
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)
APNIC
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 

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