April 2018
Beginner to intermediate
406 pages
9h 33m
English
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 /> ...