I have this assign:
user_form: to_form(%{"username" => "Kermit", "email" => "kermit@frog.com"})
which I use like this:
<.form for={@user_form} phx-submit="save">
<.input
type="text"
field={@user_form[:username]}
style={"border-width: #{rem(@ticker, 2) + 1}px; border-color: red;"}
/>
<.input type="text" field={@user_form[:email]} />
<.button>Save</.button>
</.form>
So everytime I inc the @ticker assign, the input is updated (because style changes)
What happens is:
The value property is reset to the initial value of the value attribute.
Is this expected? Or am I doing sth wrong with the forms (most of the docs expect us to use changesets, but I use a simple map here, so maybe there is some magic going on with changesets that I do not understand…)






















