Liveview form binding password inputs

hello, (im new to liveview)
There is a section in the liveview form binding for password inputs which says:

Blockquote Password inputs are also special cased in Phoenix.HTML. For security reasons, password field values are not reused when rendering a password input tag. This requires explicitly setting the :value in your markup, for example:

<.input field={f[:password]} value={input_value(f[:password].value)} />
<.input field={f[:password_confirmation]} value
{input_value(f[:password_confirmation].value)} />

what does password field values are not reused when rendering a password input tag mean? what effect does it have?

Let’s say you render a form for an existing user which has email and password fields, the email field will be populated with the user’s email address but the password field will be blank.

1 Like

In addition to this, I think the password field will also get reset when doing submit if you don’t specifically set the input value.

1 Like