links: [[Phoenix MOC]]
---
# Phoenix HTML Form
You can create forms in three ways
#### Using changeset:
The changeset comes from the `Ecto.changeset`
```elixir
<%= form_for @changeset, "/register", fn f -> %>
<%= label f, :email %>
<%= email_input f, :email, placeholder: "
[email protected]" %>
<%= error_tag f, :email %>
<%= submit "Submit" %>
<% end %>
```
#### With limited data:
```elixir
<%= form_for @conn, "/login", fn f -> %>
<%= text_input f, :search %>
<%= submit "Search" %>
<% end %>
```
#### Without Form data:
```elixir
<%= text_input :user, :name, value: "This is a populated value" %>
```
---
tags: #html, #form, #phoenix
source:
- [Phoenix HTML Docs](https://hexdocs.pm/phoenix_html/Phoenix.HTML.Form.html)