<?xml version="1.0" encoding="utf-8"?>

Successful user experience lies in the details, including components like inputs. Systems collect information about users through inputs, and understanding the best practices for input design reduces the risk of failing in this regard.

From the way search inputs function to the error messages your forms display, good UX strives to simplify and streamline users' ability to achieve their goals. Well-designed inputs enhance the usability of forms and ultimately result in higher conversions and greater overall product satisfaction.

Exercise #1

Don't truncate error messages

Don't truncate error messages Bad Practice
Don't truncate error messages Best Practice

Encountering an error message is often a frustrating experience for users. It signifies that an issue has occurred, and users must invest additional effort to proceed with their task. To lessen this frustration, offer a helpful and constructive explanation about the problem and provide clear instructions on how users can resolve it promptly.

When designing error messages, ensure that they are easily scannable at a quick glance. Ideally, aim to keep the message within a single line to maximize visibility and avoid overwhelming users with too much text.

If the message cannot fit within one line without compromising clarity, it's acceptable to extend it to a second line. However, ensure that the message remains complete and coherent without any truncation, as cutting off essential information can lead to further user confusion.

Exercise #2

Use the right selection controls

Use the right selection controls Bad Practice
Use the right selection controls Best Practice

Selection controls allow us to pick an item or a few items and move on with a task. Dropdown menus can be good choices for longer lists — they save space and don't overwhelm users. But for shorter lists with up to 5 options, they're unnecessarily complicated.

Radio buttons work much better in cases when you need to make a single selection, as they're more straightforward and require fewer clicks. If you allow users to make multiple choices, consider using checkboxes.

Exercise #3

Simplify search with real-time suggestions

Simplify search with real-time suggestions Bad Practice
Simplify search with real-time suggestions Best Practice

There are nearly 200 countries worldwide, and finding yours in the dropdown list can be a pain, even when they're in alphabetical order. To avoid frustration, provide search functionality to filter the options as users type — it's called auto-suggest. In contrast to dropdown menus that require users to scroll endlessly, the functionality finds matches and immediately presents them as users type in an input.

Country lists aren't the only inputs that benefit from auto-suggest search. Consider using this functionality any time users need to select from a long list of options.

Exercise #4

Highlight matching characters for better scanning

Highlight matching characters for better scanning Bad Practice
Highlight matching characters for better scanning Best Practice

Fields with incremental search show all results that match what users are typing as they type. Use a different font style to differentiate between the matching characters a user has typed and the rest of the suggested word or phrase. Use bold vs. regular weight to differentiate between the matching and suggested parts.

Exercise #5

Place error messages below the input

Place error messages below the input Bad Practice
Place error messages below the input Best Practice

Placing error messages near input fields improves usability. Users quickly associate the error with the specific field, reducing frustration and speeding up correction. The best placement is to the right of the input or directly below it.[1]

Errors placed above the input can be missed, especially in forms with multiple fields. Errors on the left disrupt the reading flow in left-to-right languages. Messages should be visually distinct but not intrusive.

For accessibility, errors should be programmatically linked to inputs using ARIA attributes. This ensures screen readers announce them properly to those using such assistive technology.

Exercise #6

Prevent errors with phone input masks

Prevent errors with phone input masks Bad Practice
Prevent errors with phone input masks Best Practice

There are plenty of ways users can input a phone number. Instead of forcing users to type in the desired format, you can use a phone mask and prevent errors.[2] It allows users to enter the phone in whatever way they like and then auto-format the number into a standard format for your system's purposes.

Remember that input masks aren't placeholders. They appear only on focus and as users start typing. Placeholders, in fact, can be remarkably misleading, looking like automatic defaults and making users think the data is already filled.

Exercise #7

Prevent wrong formats with date masks

Prevent wrong formats with date masks Bad Practice
Prevent wrong formats with date masks Best Practice

Considering the fact that users in different countries format dates differently, input masks are really essential. For example, most of the world uses the DD/MM/YYYY format, while the USA uses MM/DD/YYYY instead. Adding a date mask helps avoid confusion and ensures that dates are uniform.

Pro Tip: If possible, use the default date and time format according to each user's location and settings.

Exercise #8

Add a currency label to remove confusion

Add a currency label to remove confusion Bad Practice
Add a currency label to remove confusion Best Practice

When your product is accessible to users around the world, it's important to inform those who typically use a different currency in their daily transactions about the currency your website or service accepts. This information becomes particularly relevant when users need to convert currency or filter a list of items, such as on an e-commerce site. While it may seem like a small detail, providing a clear currency label serves as a reassuring guide for users on their journey and subtly contributes to building trust.

Exercise #9

Prevent typos with credit card input masks

Prevent typos with credit card input masks Bad Practice
Prevent typos with credit card input masks Best Practice

Any time users are making a purchase, remove as many potential stumbling blocks as possible. The more a user has to think about the process, the more chances they have to change their mind entirely.

One effective way to reduce these uncertainties and enhance the user experience is by incorporating a credit card input mask into your payment forms. This input mask serves as a visual guide, making it easier for users to enter their credit card information accurately. It ensures that the information is formatted correctly, minimizing the risk of errors, and consequently reducing potential frustrations or complications during the checkout process. 

Exercise #10

Provide helpful error messages

Provide helpful error messages Bad Practice
Provide helpful error messages Best Practice

When users fill up forms while making a purchase or booking a flight ticket, they want to stay informed about what's happening in the system.

To make the error inputs easy to notice and understand:

  • Indicate error inputs using a prominent, contrasting color (usually red) and a relevant icon
  • Politely describe what happened and what users should do to fix the problem. 
  • Apply real-time, inline validation rather than submit-time modals. The latter breaks the flow and distracts users. Errors that appear immediately allow users to correct their answers before moving on.[3]
Complete this lesson and move one step closer to your course certificate