nicolasblanco / elixir-bootform

Create bootstrap forms with elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bootform

Hex.pm Version

Installation

If available in Hex, the package can be installed as:

  1. Add bootform to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:bootform, "~> 0.1"}]
end
```
  1. Configure the Gettext backend module in your config.exs file in order for Bootform to correctly translate the error messages.
```elixir
  config :bootform, gettext_backend: MyAppWeb.Gettext
```
  1. Enjoy Bootform
```elixir
  <%= form_for @comment, post_path(@conn, :index), fn f -> %>
    <%= input f, :mail, false, type: :email, placeholder: "Your email" %>
    <%= input f, :username, false, placeholder: "Your username" %>
    <%= textarea f, :content, false, placeholder: "Your comment" %>
    <%= Bootform.submit "Envoyer" %>
  <% end %>
```

About

Create bootstrap forms with elixir


Languages

Language:Elixir 100.0%