Updating the UI to include password fields

The good news is that updating our UI to include these options is actually really simple! All we need to do is add two new password inputs on the user form for each of the virtual fields. Because we were smart about things and added them as virtual fields to our changeset, we don't have to do any extra work, which is fantastic! Let's take a look at lib/vocial_web/templates/user/form.html.eex:

<div>  <%= form_for @user, user_path(@conn, :create), fn f -> %>     <%= label f, :username, "Username:" %>     <br />     <%= text_input f, :username %>     <br />     <%= label f, :email, "Email:" %>     <br />     <%= text_input f, :email %>     <br />     <%= label f, :password, "Password:" %>     <br />     <%= password_input f, :password %> <br /> ...

Get Phoenix Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.