Skip to content

Instantly share code, notes, and snippets.

@mavuio
Last active August 30, 2021 09:26
Show Gist options
  • Save mavuio/9b96b27f3422665f782059e1238f24bf to your computer and use it in GitHub Desktop.
Save mavuio/9b96b27f3422665f782059e1238f24bf to your computer and use it in GitHub Desktop.
<div class="font-mono text-xs whitespace-pre-wrap">form_state: <%= @form_state |> inspect(pretty: true) %></div>
<div class="font-mono text-xs whitespace-pre-wrap">saved_form_state: <%= @saved_form_state |> inspect(pretty: true) %> </div>
<div class="font-mono text-xs whitespace-pre-wrap">form_changeset: <%= @form_changeset |> inspect(pretty: true) %></div>
<div class="max-w-[300px] my-5">
<%= f = form_for(@form_changeset, "#", [ as: :form_data, phx_submit: :save, phx_change: :validate]) %>
<%= input f, :keyword, label: "Keyword" %>
<%= submit "save", class: "btn btn-outline text-sm mt-4" %>
</form>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment