Skip to Content
Phoenix Web Development
book

Phoenix Web Development

by Brandon Richey
April 2018
Beginner to intermediate content levelBeginner to intermediate
406 pages
9h 33m
English
Packt Publishing
Content preview from Phoenix Web Development

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 /> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Phoenix in Action

Phoenix in Action

Geoffrey Lessel
Real-Time Phoenix

Real-Time Phoenix

Stephen Bussey

Publisher Resources

ISBN: 9781787284197Supplemental Content