<commit_before>![GeneralAssemb.ly](../../img/icons/FEWD_Logo.png)

#FEWD - Forms & Inputs

Because at some point, you need to ask users to give you data, right?

---


##Forms

Forms are how we can get data from users.

![](../../img/unit_2/forms.png)

---

##Forms

Forms tell the page: 

*	Where to send the data
*	How to send it
*	What is being sent

---

##Form Tag

![](../../img/unit_2/form_tag.png)

Available Attributes

*	Method
*	Post,get,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, etc
	*	Name
	*	Placeholder
	*	Value

Complete Spec: http://www.w3schools.com/tags/tag_input.asp

---


##Text

Use value to set initial text

<commit_msg>Fixed typo in lesson 12 slides<commit_after>![GeneralAssemb.ly](../../img/icons/FEWD_Logo.png)

#FEWD - Forms & Inputs

Because at some point, you need to ask users to give you data, right?

---


##Forms

Forms are how we can get data from users.

![](../../img/unit_2/forms.png)

---

##Forms

Forms tell the page: 

*	Where to send the data
*	How to send it
*	What is being sent

---

##Form Tag

![](../../img/unit_2/form_tag.png)

Available Attributes

*	Method
*	Post,get,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, etc
	*	Name
	*	Placeholder
	*	Value

Complete Spec: http://www.w3schools.com/tags/tag_input.asp

---


##Text

Use value to set initial text


{'fraction_non_alphanumeric': 0.1601193436101442, 'fraction_numerical': 0.003978120338140228, 'mean_word_length': 3.191666666666667, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '87438', 'n_tokens_mistral': 757, 'n_tokens_neox': 727, 'n_words': 223}