Use Cards In Ionic For Mobile Form Goodness

After reading, please checkout the upcoming app, Kids In Touch.

Have you ever tried to fill out an even slightly detailed form on a mobile device? It sucks, right? It becomes even worse when you have to start scrolling down to reach each portion of the form.

Here’s an example:

Old single-page Invite a Friend form, top: First Name “Jane” and Last Name “Doe”, then a “What Number Should We Text To?” list with mobile number options.
Old single-page Invite a Friend form, top: First Name “Jane” and Last Name “Doe”, then a “What Number Should We Text To?” list with mobile number options.
The same form scrolled down: phone number options, then “What Address Should We Email To?” with email options.
The same form scrolled further: Home and Mobile numbers, then the email list with Home test@test.com and Work goofing@work.com.
The old form with the number keypad covering the bottom half while entering a mobile number.
The old form with the full keyboard covering the bottom half while entering an email address.

Sorry for all the scrolling. It’s hard to format images easily with Ghost. Anyway, that looks like a lot of scrolling, right? Also, when the keyboard is up, the field outlines above look really ugly. Now imagine going through all of that and pressing submit. What if a few fields get marked invalid. How will you notifcy the user? They are going to need to scroll through the whole thing to find the problems. Good bye user.

To solve this, I used the Ionic Framework’s Card feature UI element.

Here’s the new version:

New card-based Invite a Friend form, step 1: a card with First Name “Jane”, Last Name “Doe” and a green Save button.
Step 2: a card showing Jane Doe with toggles for Send Invitation by Text and Send Invitation by Email, both off.
Send Invitation by Text turned on, revealing a card of mobile number choices.
Entering a mobile number in the text card, with the number keypad open.
A new number, 555-000-9999, typed into the text card with a green Save button below.
The Invite a Friend card now lists Jane Doe and the number 555-000-9999, with the email toggle off and a green Send Invitation button.
Image No Longer Available
Send Invitation by Email turned on, revealing a card of email address choices.
Typing test@test.com into the email card, with the keyboard open.
The email card with test@test.com entered and a green Save button.
The finished invitation card: Jane Doe, 555-000-9999 and test@test.com, with a green Send Invitation button.

Now, the form is broken up into small chunks. Each chunk is for a specific type of information. When working on email for example, the user doesn’t see all the phone number and name information. Each section is compact and doesn’t require scrolling even on an iPhone 4 (non-retina). If there are any client side errors, the issue can be seen and resolved before moving onto the next section.

Once the form is complete, everything is shown in a nice compact form. If there are any server validation errors after submission, the user can open that section for corrections.