Current section

Files

Jump to
phoenix priv templates phx.gen.html form.html.eex
Raw

priv/templates/phx.gen.html/form.html.eex

<%%= form_for @changeset, @action, fn f -> %>
<%%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<%% end %>
<%= for {label, input, error} <- inputs, input do %>
<div class="form-group">
<%= label %>
<%= input %>
<%= error %>
</div>
<% end %>
<div class="form-group">
<%%= submit "Submit", class: "btn btn-primary" %>
</div>
<%% end %>