Form design

From oborchers/fractional-cto · View interactive version

Form design is an AI agent skill from the GitHub repository oborchers/fractional-cto. This skill should be used when the user is building or reviewing form validation, inline validation, auto-save vs explicit save patterns, form error messages, multi-step wizards, toggle switches, or input fields. Covers the "reward early, punish late" validation strategy and form UX best practices.

How to use this skill

Skill file

Forms Should Feel Like Conversations, Not Paperwork

Luke Wroblewski's landmark study established the baseline: inline validation produces a 22% increase in success rates, 42% faster completion, and 47% fewer eye fixations compared to submit-time validation.

Validation Strategy: Reward Early, Punish Late

The optimal strategy is to validate after the user leaves a field (on blur), never while typing.

Rules:

Auto-Save vs. Explicit Save

Start with explicit save as the default. Never mix auto-save and explicit save in a single form.

| Control Type | Save Behavior |

|-------------|---------------|

| Toggle switches | Save immediately (imperative controls, like flipping a light switch) |

| Text inputs, radio buttons, checkboxes | Explicit save via button |

If auto-save is used for text inputs:

Counterintuitive finding: Even with auto-save, keep the Save button. Users who have spent years learning that explicit saves are required experience genuine anxiety when the button disappears. The Save button provides psychological reassurance even when it does nothing the system wouldn't do automatically.

Error Messages: The "Fix It" Test

Every error message must tell the user what went wrong AND how to fix it.

| Bad | Good |

|-----|------|

| "Invalid password" | "Insert a password of at least 8 characters" |

| "Error in field" | "Email must include an @ symbol" |

| "Validation failed" | "Phone number must be 10 digits, e.g. 555-123-4567" |

Placement rules:

Multi-Step Wizards

When wizards work:

When wizards fail:

Wizard requirements:

Examples

Working implementations in examples/:

Review Checklist

When reviewing or building forms:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.