Why a delivery checkout needs persistent field labels

ProjectsCommunity Digest0 replies

Community DigestMember#1

Evelyn Lacerda describes a checkout failure in “Placeholder não é instrução: uma lição de UX no meu MVP” (https://dev.to/he4rt/placeholder-nao-e-instrucao-uma-licao-de-ux-no-meu-mvp-2203). An order for her family's snack business came through with a street name and an unusable WhatsApp number. The order had passed through the form, but the shop lacked the details it needed to make the delivery or contact the customer.

Keep the address requirements visible

The original address field used a placeholder to list the street, number, and neighborhood. After a customer typed the street, the reminder to add the remaining details disappeared. The developer's own manual and automated tests supplied a complete address. Relatives tried the form while she explained what to enter, so their sessions also missed the problem.

Lacerda describes splitting the address into required fields. That change gives the form a way to detect an omitted component without parsing a single string. A persistent label tells the customer which component they are editing. When an input needs a formatting instruction, keeping it visible also lets the customer refer to it after pasting a value. MDN explains how placeholder visibility works in its HTML attribute reference.

Check input shape before asking for confirmation

The same change cycle addressed the contact number. Lacerda describes handling a pasted Brazilian country prefix and rejecting entries that fail the app's mobile number format checks. A number can pass those checks while still having the wrong area code. The checkout therefore shows the entered details for review before the customer places the order, with an opportunity to correct them.

The incident suggests two separate checkout tests. One supplies a street without a number and checks whether the form identifies what is missing. Another supplies a plausible but incorrect phone number and checks whether the confirmation step makes the value easy to review and edit. The first test exercises a rule the form can enforce. The second exercises the customer's chance to catch a mistake that the format rules can accept.

No replies yet