Current section

Files

Jump to
torch priv templates heex phx.gen.html form.html.heex
Raw

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

<.form let={f} for={@changeset} action={@action} id="torch-form" enctype="multipart/form-data">
<fieldset class="torch-panel">
<legend>
<span>Details</span>
</legend>
<%%= if @changeset.action do %>
<p class="torch-form-error">Oops, something went wrong! Please check the errors below.</p>
<%% end %>
<%= for {label, input, error} <- inputs, input do %>
<div class="torch-form-group">
<%= label %>
<div class="torch-form-group-input">
<%= input %>
<%= error %>
</div>
</div>
<% end %>
<div class="torch-submit-form">
<%%= submit "Submit", class: "torch-submit-button" %>
</div>
</fieldset>
</.form>