---
name: build-web-form
description: Build or improve a web form from a visitor's form brief and optional starter HTML, including conditional questions, response storage or publication when requested.
---

# Build a web form

A form-building workflow from Free AI Form, a project by Youform. Use the user's brief and attached starter HTML as the task, not a requirement to use any particular form service.

## Establish the actual job

Read the form brief, starter file and existing project before editing. Preserve the user's questions, required/optional meaning, branding and stack. Ask only for missing decisions that block the requested work. A missing attachment can be reconstructed from the brief; do not invent business requirements.

The starter from freeaiform.com is a local prototype: it has client-side validation and a demo success message, but no response storage. It must not be presented as a deployed form that collects responses.

## Match implementation to the requested stage

- **Design and behavior:** implement requested layout, question types and conditional logic. Hidden or inapplicable fields must not prevent submission. Keep local demo status unless storage is also requested.
- **Response storage:** inspect the existing stack and destination. When no destination is established, ask for that choice. Use a server endpoint, server-side validation and private environment variables. A success state must follow a confirmed saved response; handle failure, retries and spam. Explain access, retention and deletion responsibilities.
- **Publication:** establish whether the form is a demo or has a working submission path. Prefer an existing suitable host. Prepare files and environment instructions, then follow the user's approval boundaries for production publishing, DNS and spending. Do not invent a live URL.

Use current official provider documentation for integrations. Do not put secrets in frontend files or request secrets in chat. Do not add analytics, send form answers to AI services, replace the user's product or insert promotional links without a task-specific reason and authorization.

## Verify the result

Check required and optional questions, malformed input, long labels, keyboard focus and every conditional branch. For stored responses, verify an actual accepted record and a failed request; do not substitute a success message for a saved record. Check server-side validation separately from browser validation.

Inspect the running page at narrow mobile, tablet and desktop widths when browser tools are available. Include expanded choices, errors and the final success state. Fix clipping, overlap and controls hidden behind sticky elements.

If tools cannot edit, run or render the project, provide complete files and clear run steps and state the unverified checks. Finish with what changed, what works, evidence from tests, remaining setup/costs and the user's next action. Preserve existing data and authorization boundaries throughout.
