Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Start a free Basic trial
to watch this video
In addition to form validation, there are several other design patterns that can be applied to user input.
Resources
- UI Patterns - UI Patterns is one of the most comprehensive resources for both UI patterns and behavioral patterns.
- PatternTap - PatternTap is another library of UI and UX patterns, categorized slightly differently than UI Patterns.
Downloads
- Balsamiq Mockups - Balsamiq Mockups is the drawing tool used in these lessons. If you'd like to follow along using the same tool, download and install it. However, any other drawing tool (including pencil and paper) will work fine.
- Project Files - This is the Balsamiq Mockup file that was created during these lessons (as it appears at the end of the course). It's not necessary to download it, it's just here for your review.
-
0:00
In addition to form validation,
-
0:02
there are several other design patterns that can be applied to user input.
-
0:06
When I schedule appointments at my veterinarian for
-
0:09
my cats, the form asks for three different dates that might work for me,
-
0:14
and they can be prioritized from most desirable to least desirable.
-
0:18
Let's see how a problem like picking prioritized dates
-
0:22
can be resolved with some design patterns.
-
0:26
We want the user to be able to add appointment dates to a list, and
-
0:31
then reorganize that list according to their most desired date and least desired.
-
0:37
The first thing we need to add is a way to add these dates.
-
0:41
We could do this with say a text input, so
-
0:46
I could go to Forms here, and I could drag out a Text Input like this.
-
0:52
But it would be very challenging to get the user to format
-
0:57
the date in the way that the form is expecting, so let's get rid of that.
-
1:03
Instead, when there's a limited set of possibilities,
-
1:06
it's best to provide specialized input.
-
1:09
Many forms take dates using drop down menus of days, months, and years.
-
1:15
That's probably best when there's a wide number of possible dates such as when
-
1:19
you're asking the user for their date of birth.
-
1:22
But if we just need a day that's in the near future like within a few weeks.
-
1:27
It's best to use a design pattern called a calendar picker.
-
1:32
Balsamiq has a field element just for that in the forms section,
-
1:37
and they call it a Date Chooser.
-
1:42
So I'm going to scroll over here to the Date Chooser and
-
1:46
drag that into the canvas area.
-
1:50
And when a user clicks this form element, a calendar will pop up,
-
1:56
so let's add that calendar with a small arrow to the left.
-
2:01
In Balsamiq, you can find interface elements quickly
-
2:04
by typing in the search box up in the right, so let's do that.
-
2:08
We'll type in Calendar, and there it is, and
-
2:12
I'll drag that over here and make it a little larger.
-
2:19
And then I want a little arrow on the left side.
-
2:23
Believe they call it a Caret, so we'll do a Caret Left,
-
2:29
and I'll just drag that so it's flush with the calendar there.
-
2:36
And let's line that up a little better, there we go.
-
2:39
So in the calendar picker pattern,
-
2:41
the user can use the arrows in the top left and
-
2:46
right to change months, and then click on a date to select it.
-
2:53
Sometimes if a range of dates needs to be selected,
-
2:56
such as in the case of booking a hotel for several days.
-
3:00
The user can click on the first day in the range and then select the end date.
-
3:04
In this case, where we're adding dates to a prioritized list,
-
3:09
we should add a button so the user can confirm the selected date.
-
3:14
Once a user has picked a date, they'll need to add it to the list.
-
3:18
So let's go back to Forms here, and find the Button.
-
3:24
And I'm gonna put that just below this calendar picker here,
-
3:31
and we'll change this to say Add Date.
-
3:35
That finishes the date picker, and now we need to add the list of dates.
-
3:40
Each date should have the ability to be deleted, so let's do that.
-
3:46
I'm going to use just some rectangles for that, so I'll go to Common here,
-
3:51
and there is a rectangle.
-
3:53
And I'll make it roughly the same size as the calendar
-
3:59
picker there, maybe a little thinner.
-
4:05
Change the Border Style, and
-
4:07
then I want to add some text to this so I'll drag out a label here.
-
4:14
And let's just pick some dates here,
-
4:20
so here's my most desired date.
-
4:25
I will make this a little larger.
-
4:29
There we go, and we want to be able to delete this too, so let's.
-
4:42
Add that times icon there, and let's actually change this to maybe red.
-
4:50
So it looks like a delete button, and maybe let's put a circle behind it too.
-
4:57
So we'll right-click on that, send it backward, and
-
5:02
let's actually make that red, and we'll make the times icon white.
-
5:10
There we go, this looks a little better.
-
5:17
So we'll do that, and now we'll just select all this, and copy and paste it.
-
5:23
So let's say we've added three dates here, and we'll just change the days on these.
-
5:35
And now we have some dates added there.
-
5:37
However, these dates need to be prioritized, so
-
5:41
we can't just add them to a static list.
-
5:43
It would be really annoying if the user had to delete items,
-
5:48
and re-add them just to rearrange the list.
-
5:52
We can fix this with a UI pattern called Drag and Drop.
-
5:56
In this pattern, the user can click and drag a handle,
-
6:00
usually represented by a few lines that are together.
-
6:04
And as I drag an item to another place on the list, the list will rearrange itself.
-
6:10
So let's add those three lines, usually this is called a hamburger menu.
-
6:16
And it looks like Balsamiq calls the Bars, but
-
6:19
has thankfully also tagged it with hamburger.
-
6:24
So this is a little large, I'll make this smaller.
-
6:28
Put this here, the date over a little bit, and then we'll just copy and paste.
-
6:36
Those bars and move these dates over as well, just like that.
-
6:42
The handles on the left indicate to the user
-
6:46
that these items can be rearranged using drag and drop.
-
6:51
On a touchscreen, they can tap and drag with their finger,
-
6:55
and on a computer they can click and drag with their mouse cursor.
-
7:00
Once we're finished with a design pattern, the solution might seem obvious.
-
7:04
But remember where we started with this, we needed to choose dates and
-
7:08
prioritize those dates.
-
7:11
We avoided a lot of annoying UI problems like badly formatted dates,
-
7:15
or deleting and re-adding dates just to rearrange them.
-
7:20
While you're designing, try to imagine yourself as a user
-
7:24
going through the process, and think about the potential problems that might come up.
-
7:29
Chances are you're not the only one that's had this problem before, and
-
7:33
there's a design pattern that can fix it.
-
7:37
As I mentioned previously,
-
7:38
we're only reviewing a few design patterns here to get you started on the right path.
-
7:44
Be sure to check the notes associated with these videos for
-
7:46
more design pattern resources.
You need to sign up for Treehouse in order to download course files.
Sign up