DEV Community

Mosmox Studio
Mosmox Studio

Posted on Originally published at mosmox.com on

Mobile Forms: How to Reduce Data-Entry Errors

Mobile Forms: How to Reduce Data-Entry Errors

A form on a smartphone competes for attention with a small screen, a virtual keyboard, an unstable network and interruptions. The keyboard covers up to half the screen, a finger hits the neighbouring field, a notification breaks the user’s focus. If a form asks for more than the next step requires, errors and abandonment are the predictable result.

In audits we almost always find the same form problems: the wrong keyboard, no autofill, an error shown above the form instead of next to the field, and data lost after a failed request. Each of them takes hours to fix, not weeks. Below is a practical way to work on a form, a table of field settings for iOS and Android, and a pre-release checklist.

Start with the data

For each field, ask: why is it needed now, can the value be taken from the device or earlier steps, can it be filled in later? WCAG 2.2 even has a dedicated success criterion, 3.3.7 Redundant Entry: information the user has already entered within the same process should not be required again — it should be pre-filled or offered for selection.

  • A single “Name” field instead of separate first and last name fields, if you don’t need them split.
  • City and region derived from the postcode or location, with the option to correct them.
  • Shipping address defaulting to the billing address.
  • Optional fields either removed or clearly marked as optional.

Long forms are better split into logical stages with visible progress, but a simple action shouldn’t be broken into many screens. We wrote about reviewing the whole scenario, not just the form, in our piece on shortening the path to the first outcome.

Keyboard and autofill: field settings

The right keyboard type and autofill hints are the cheapest form improvement there is. The system can fill in email, phone, address, a password from the password manager and a one-time code from SMS — but only if the field is described correctly.

Field iOS Android Note
Email keyboardType .emailAddress, textContentType .emailAddress KeyboardType.Email, autofill hint emailAddress Turn off auto-capitalisation and autocorrect
Phone .phonePad, textContentType .telephoneNumber KeyboardType.Phone, hint phoneNumber Country code as a separate picker or prefix
One-time code textContentType .oneTimeCode KeyboardType.NumberPassword, SMS User Consent or Retriever API One field instead of six separate boxes
Password .password or .newPassword KeyboardType.Password, hint password A “show password” toggle instead of a confirmation field
Amount, quantity .decimalPad or .numberPad KeyboardType.Decimal or Number Respect the locale’s decimal separator
Address, postcode .fullStreetAddress, .postalCode hints postalAddress, postalCode Don’t require a format that doesn’t exist in the user’s country

What else reduces errors

  • Formatting as people type without changing the stored value: card numbers in groups of four, phone numbers with spaces.
  • Lenient parsing: accept numbers with spaces, brackets and dashes instead of demanding “digits only”.
  • Choosing instead of typing where there are few options: dates via a picker, delivery type via toggles.
  • A “Next” key on the keyboard that moves to the next field, and “Done” or the form action on the last one.
  • One clear primary action and a proper loading state that prevents double submission.
  • Keeping entered text after a failed request, a lost connection and returning from the background.

Errors: when and how to show them

WCAG success criterion 3.3.1 Error Identification requires errors to be identified and described in text, not just with a red border. In practice this means:

  1. Show the error next to the field, not only at the top of the form.
  2. Explain how to fix it: “Enter 9 digits after +380”, not “Invalid format”.
  3. Validate a field when the user leaves it, not on every keystroke — otherwise people see an error before they have finished typing.
  4. Remove the message as soon as the value becomes valid.
  5. After a submission with errors, move focus to the first problem field and announce it to the screen reader.
  6. Phrase server errors as humanely as client-side ones, and don’t clear the form.

How to test a form

Test the form on a small screen, with a large system font and after returning from the background. On Android font scaling can reach 200%, and on iOS accessibility sizes go even larger — that is when labels overlap fields and the submit button disappears under the keyboard. Quality UX according to Android means not just a nice default state but predictable behaviour when something goes wrong.

  • Fill in the form one-handed on the smallest supported device.
  • Turn on the largest font size and check that every label is readable.
  • Go through the form with VoiceOver and TalkBack: every field has a clear name and errors are announced.
  • Cut the network before submitting and make sure no data is lost.
  • Check autofill from the password manager and one-time codes from SMS.

What to measure

Measure form completion, the number of resubmissions, errors per field and time to a successful result. It helps to log which field triggered a validation error (without the entered values, to respect privacy): this shows where a format is unclear. In our experience, one or two “problem” fields usually account for most of a form’s errors, so that is where fixes should start.

Common mistakes

  • A field to confirm the email or password instead of a way to view what was typed.
  • A placeholder instead of a label: after typing, people forget what the field was.
  • An input mask that blocks pasting a copied value.
  • Clearing the entire form after a server error.
  • A disabled submit button with no explanation of what is missing.

Mobile form checklist

  • Every field is needed right now; the rest has been postponed or removed.
  • Keyboard types and autofill hints are configured for all fields.
  • Errors appear next to the field as text and explain how to fix them.
  • Data survives errors, lost connectivity and backgrounding.
  • The form works with large fonts, a screen reader and one hand.
  • Analytics shows errors per field and resubmissions.

The best optimisation is often not a new design but removing an unnecessary question. And don’t forget to test forms on weaker devices: we described how in our piece on testing on affordable devices.

Sources: Android Developers: App quality and user experience; Android Developers: Autofill; Android Developers: Configure text fields in Compose; Apple Developer: UITextContentType; Apple Human Interface Guidelines: Entering data; WCAG 2.2: Error Identification; WCAG 2.2: Redundant Entry; web.dev: Payment and address form best practices.


Originally published on the Mosmox journal: Mobile Forms: How to Reduce Data-Entry Errors

Top comments (0)