updating password through ash resources
trying to update the password but
current_password
field data vanishes as soon as i enter the data in new_password
. the current_password
field vanishes12 Replies
frontend part
password form in mount
in
user.ex
:
I tried debugging it but my current_password
field is like it was never there.can I see where you are validating the form?
"validate_password"
that event handlerπ€
Does it happen for password and password confirmation?
or only for current_password
only for
current_password
at the momentThats the only one you're setting an
id
for π
Try not setting the id and see if that worksI inspected the params in validate and they are
id of form?
current_password still doesn't show up in params
also this:
I think the id is actually fine to change, but the name shouldn't be changed directly
Unless you do it like this
name={"#{f.name}[current_password]"}
The name is crucial to how Phoenix builds the params to return, always best to let the component helpers build the name for you.
name was the issue
Thank you guys π«Άπ»
Basic User Settings Implemented using the Ash resources. Thank you to both of you π«°π»
@Zach Daniel @frankdugan3