Sub topic 1
What a form is for: fewer fields, clearer purpose
A form is a short conversation between a person and a system. The person wants something done, such as an account, a delivery or an answer. The system needs a few facts to do it. This chapter covers how to decide which facts to ask for, and how to state the purpose of the form so people finish it.
Prerequisites
This chapter assumes you can:
- Write basic HTML with
form,input, andbuttonelements. - Style text and spacing with CSS.
- Read simple JavaScript. You only need it for the later validation chapters, not here.
No tools are needed beyond a text editor and a browser.
Start with the goal, not the fields
Many forms grow by accumulation. Marketing wants an interest field, support wants a phone number, and sales wants a company size. Each request seems small. Together they produce a form that people abandon.
Before you design any field, write the form's goal in one sentence. Use this pattern:
> The user wants to __, and we need __ to make that happen.
Do not read that line as a block quote in your page. It is a template for your design notes. Two filled-in examples:
- Newsletter signup: the user wants weekly articles by email, and we need an email address.
- Delivery checkout: the user wants an order delivered, and we need a name, a delivery address, and a way to pay.
If a field does not serve the sentence, it does not belong in the form. This is the main test used in the rest of the chapter.
Count the cost of every field
Each field costs the user time and effort, and it also costs you. The costs are easy to overlook.
| Cost | Who pays | Example |
|---|---|---|
| Typing and thinking time | User | Recalling a postcode or a document number |
| Error chance | User | A mistyped phone number triggers a validation error |
| Privacy concern | User | Asking for a birth date to send a newsletter |
| Storage and compliance duty | Organization | Holding personal data you never use |
| Maintenance | Team | Validation rules, error messages, and tests for each field |
The privacy and compliance rows deserve attention. Data you collect creates responsibility for it. Privacy laws such as the GDPR in the EU and UK expect you to collect only what you need for a stated purpose. This is called data minimization. Asking for less is often the simplest way to meet that expectation.
Decide what to remove
Go through your field list and apply four questions to each field, in order.
- Do we need it to complete this task? If not, remove it.
- Can we get it another way? You can often infer or look up the value. A city and region can come from a postcode lookup. A country can come from the user's locale as a default. A name can be one field rather than two.
- Can we ask for it later? Information needed only after the task, such as a profile photo, can wait until the user has a reason to give it.
- Is it for us or for them? Fields that serve only internal reporting, such as "How did you hear about us?", are the first to cut or make optional.
Worked example: a signup form
Here is a signup form that grew over time. Each row shows the decision.
| Field | Decision | Reason |
|---|---|---|
| Email address | Keep | Needed to create and recover the account |
| Password | Keep | Needed to sign in |
| Confirm password | Remove | Offer a "show password" toggle instead, which catches typos with less effort |
| First name, last name | Merge or defer | Ask for one "Name" field only if you address users by name |
| Phone number | Remove | No feature uses it |
| Date of birth | Remove | Ask only if law or the service requires an age check |
| Company size | Defer | Ask during onboarding, after the account exists |
The form shrinks from seven fields to two. Here is the result:
<form action="/signup" method="post">
<h1>Create your account</h1>
<label for="email">Email address</label>
<input id="email" name="email" type="email" autocomplete="email" required>
<label for="password">Password</label>
<input id="password" name="password" type="password"
autocomplete="new-password" required>
<button type="submit">Create account</button>
</form>The autocomplete values help browsers and password managers fill the fields. Labels, input types and autocomplete get full chapters later. For now, notice that the form has a heading, two labeled fields and one clear action.
Make the purpose visible
Fewer fields help, but people also need to know what the form does and what happens next. State the purpose in three places.
- The heading names the task in plain words: "Create your account", not "Registration".
- The button names the outcome with a verb: "Create account", "Place order", "Send message". Avoid "Submit", which describes the mechanism and not the result.
- Nearby text explains anything surprising: why you ask for a phone number, how you will use an email address, or when the user will hear back.
When you ask for something that looks unnecessary, say why. A short line such as "We use your phone number only if a delivery problem comes up" removes doubt and often raises completion.
Choose the form's shape
The number of fields is one measure. The shape of the task is another. Three common structures:
- Single page. Best for short forms, roughly under ten fields. Users see the whole task and can review it at once.
- Multi-step. Useful for long, naturally divided tasks such as checkout. Each step should have one theme, show progress, and keep earlier answers when the user goes back.
- Conversational or one question per page. Suited to complex, high-stakes tasks, such as government services, where each question needs explanation. It reduces overload but adds page loads.
Splitting a form into steps does not reduce the information you ask for. It only changes how it is presented. Cut fields first, then split what remains.
Edge cases and judgment calls
Reducing fields is a default, not a rule. Watch for these situations.
- Required by law or the business. Payment, tax, and identity checks often need specific data. Keep it, and explain why.
- Fewer fields can mean worse data. One free-text "Address" box is short, but it produces data that is hard to validate and deliver to. Several structured fields, or an address lookup, can be the better trade. Measure the outcome, not just the field count.
- Optional fields still cost something. An optional field draws attention and invites doubt about whether to fill it. If few people use it, remove it.
- Existing users. Do not ask logged-in users for information you already hold. Prefill it and let them confirm or edit.
- Sensitive data. Fields about health, ethnicity or similar topics need a clear reason, careful wording and often an option such as "Prefer not to say".
Check your work
You can evaluate a form before you build it. Print or list every field and answer these questions.
- Can you state the goal in one sentence?
- Can you point to the part of that sentence each field supports?
- Does the heading name the task, and does the button name the result?
- Did you explain any request that could look intrusive?
Later chapters add checks for labels, order, and errors. This first pass is cheap and removes the largest source of friction.
Summary
A form exists to complete a task, so every field must support that task. Write the goal as one sentence, test each field against it, and remove, infer or defer what fails. Then name the task in the heading, name the result on the button, and explain unusual requests. The next chapter covers the first thing every remaining field needs: a visible, associated label.
Exercise
A "Contact us" form asks for name, email, phone number, company, job title, country, and message. The goal sentence is: "The user wants to ask a question, and we need a way to reply and the question itself." Which fields would you keep, which would you remove or make optional, and what would you name the submit button?
Show answer
Keep email (the way to reply) and message (the question). Name is optional to keep: keep it only if replies use the person's name, otherwise remove it. Remove phone number, company, job title and country, since none is needed to reply to a question; if sales needs them, ask in the reply or after the conversation starts. Name the button "Send message" because it states the result, where "Submit" describes only the mechanism.
Exercise
A checkout form has one free-text "Address" box and a "Confirm email" field. Give one argument for changing each, and one risk of the change.
Show answer
Address: split it into structured fields or add an address lookup, because free text produces data that is hard to validate and deliver to. The risk is that more fields add effort, so use a lookup or sensible defaults. Confirm email: remove it and rely on a clear "Email address" label plus validation, because retyping adds effort and many users paste the same value. The risk is that typos go uncaught, so send a confirmation message and let users correct the address if it bounces.