# AI in forms: autofill without losing control

> AI can fill in or suggest form fields. How to design the trigger, review and correction, and what WCAG and the autocomplete attribute ask of you.

*Tags: ai, forms, interaction-design, ux-for-ai*

---


> [!info] Quick Definition
> **AI in forms** is the use of a model to suggest or fill in the fields of a form from a text, a document or the context on screen. The person remains the one who reviews and submits, and the interface should make that clear at every step.


## What does AI do in a form?

There are three common forms. The first is **filling**: the person pastes a text, uploads a document or describes their case in natural language, and the AI returns values for the fields. The second is **suggesting**: a proposed value appears for each field, which the person accepts or ignores. The third is **translating an intent**: someone says "I want to return order 1234 because it arrived damaged", and the app turns that into structured fields.

In all three cases free text goes in and formatted fields come out. Models do this well, and it is also what fails when a field receives a plausible but incorrect value.

A form is a contract: once submitted, that data is used for a payment, an appointment or a request. If the AI filled a field that nobody looked at, the person may be accepting something they did not write. That is why the underlying design is [[human-in-the-loop|human-in-the-loop]]: the model proposes and the person decides. To decide when describing beats filling in fields, see [[chat-vs-structured-ui|chat vs. structured UI]].

## How do products do it today?

Three documented examples:

- **Atlassian.** In its guide to AI user experience patterns (Dugald Morrow, February 2026), the form offers a "Fill form with AI" option. The query asks the model to respond with a JSON object where each key corresponds to a field in the form, and the approach lets the person review and edit the AI response before submitting the form.
- **Chrome.** According to Google Chrome Help, enhanced autofill ("Find and fill with Gemini") suggests details drawn from Gmail, such as flights, vehicles and orders. It is available on desktop, Android and iOS to Gemini in Chrome users in the US who are 18 or older and have opted into Personal Intelligence. Suggestions carry the Gemini icon and appear in a dropdown in the field; from there you can open the source email or choose "Remove from Chrome". Information pulled from Gmail cannot be edited in Chrome. You turn it on or off under Settings > Autofill and passwords > Enhanced autofill, with the "Find and fill with Gemini" toggle. Google announced it on October 28, 2026, so availability may change.
- **Pega Voice AI.** Its best-practices guide for voice form autofill warns that only empty fields are filled, that data arriving together is assigned in the order of the form's fields, and that multiple dates should go on separate pages, because the first date heard goes to the first date field on the page being shown.

## How do you design the flow?

Atlassian backs three pieces: an explicit trigger, per-field output, and review before submitting. The rest are recommendations from this wiki:

1. **Explicit trigger.** A button such as "Fill with AI" rather than a call on every keystroke. The person knows when AI steps in and can decide.
2. **Sufficient, visible context.** If the AI needs supporting text, ask for it. If it already has the form's context, make clear what it used.
3. **Values per field, not an opaque block.** Each field shows its proposed value and is editable. A block of text that must be copied by hand is worse than an empty form.
4. **A summary of changes.** How many fields the AI filled, which ones, and where the values came from. Options to accept, review one by one, edit or clear.
5. **Validation after the AI.** The rules that apply to a person apply to the AI: date formats, required fields, valid options. If a value fails, it is flagged and not submitted.

In implementation, the model returns an object that relates each value to its field's identifier, and the code applies it under the form's rules. The AI proposes data; it does not manipulate the page.

## What do HTML and accessibility require?

The HTML `autocomplete` attribute tells the browser what permission it has to help fill a field and what type of data is expected. According to MDN, it accepts `on`, `off` or a list of values such as `given-name`, `family-name`, `email`, `tel`, `street-address`, `postal-code`, `cc-number`, `one-time-code`, `new-password` and `current-password`. Valid values meet WCAG success criterion 1.3.5, Identify Input Purpose (level AA). MDN advises against `autocomplete="off"` except where genuinely necessary, such as a CAPTCHA or a one-time code field, and warns that made-up values defeat autofill.

Four WCAG 2.2 criteria bear directly on this pattern:

- **3.3.7 Redundant Entry (A).** Information the person already provided in the same process must be auto-populated or available to select, with exceptions such as security. It supports pre-filling.
- **3.3.4 Error Prevention, Legal, Financial, Data (AA).** For pages that cause legal commitments or financial transactions, modify or delete user data, or submit test responses, at least one option must hold: submissions are reversible, input is checked and can be corrected, or there is a mechanism to review, confirm and correct before the submission is final. A review step for the values the AI entered covers the third option.
- **4.1.3 Status Messages (AA).** A notice such as "AI filled 6 fields" must be programmatically determinable, for example with `role="status"`, so a screen reader announces it without moving focus.
- **1.3.5 Identify Input Purpose (AA).** Described above.

## When NOT to use AI in a form

- **When there are few, simple fields.** A three-field form is faster to fill by hand than to review a proposal.
- **When the error is costly and cannot be reviewed.** If a mistyped account number causes a wrong payment, require explicit confirmation or do not automate that field.
- **When the source text is ambiguous.** The AI will guess. Asking for clarification beats filling.
- **When the form requires consent.** The person must write or tick it themselves, not accept something a model proposed.

## Example

Illustrative example: a refund request form with 8 fields. The person pastes into a text box the email where the customer describes the problem, and presses "Fill with AI". The screen shows six filled fields, each with a "Suggested by AI" label, and a notice at the top, announced to screen readers: "AI filled 6 of 8 fields. Check the dates". The purchase date is highlighted because the email mentioned two dates. The person corrects it, accepts the rest and submits. Had they submitted without reviewing, validation would have stopped the ambiguous date.

## Common mistakes

- Calling the AI on every keystroke and making the form flicker.
- Filling fields without marking them as suggested.
- Submitting without validating the values the model generated.
- Showing one block of text instead of separate fields, which forces copy and paste.
- Removing `autocomplete` or using made-up values, and losing the browser's own autofill.
- Assuming the form is "ready" because the AI filled everything. Review is a step in the flow, not a formality.

## Sources

- [Atlassian, AI user experience patterns (Dugald Morrow, February 23, 2026)](https://www.atlassian.com/blog/developer/ai-user-experience-patterns): fill-form pattern with button, per-field JSON output and review before submitting.
- [Google Chrome Help, Fill out forms automatically in Chrome](https://support.google.com/chrome/answer/142893?hl=en&co=GENIE.Platform%3DDesktop): enhanced autofill with Gemini, requirements, icon, source and controls.
- [Google, Chrome's enhanced autofill with Gmail (October 28, 2026)](https://blog.google/products-and-platforms/products/chrome/enhanced-autofill-gmail/): announcement of the feature and its initial rollout.
- [MDN, the autocomplete attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete): values, usage and relation to WCAG 1.3.5.
- [W3C, Understanding 3.3.4 Error Prevention (Legal, Financial, Data)](https://www.w3.org/WAI/WCAG22/Understanding/error-prevention-legal-financial-data.html)
- [W3C, Understanding 3.3.7 Redundant Entry](https://www.w3.org/WAI/WCAG22/Understanding/redundant-entry.html)
- [W3C, Understanding 1.3.5 Identify Input Purpose](https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html)
- [W3C, Understanding 4.1.3 Status Messages](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html)
- [Pega Academy, Best practices for using form autofill](https://academy.pega.com/topic/best-practices-using-form-autofill/v1/in/64911): voice form autofill, empty fields only and assignment order.


---

Source: https://www.fernandoux.com/en/wiki/ai/ai-in-forms/
