> For the complete documentation index, see [llms.txt](https://docs.rooks.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rooks.ai/build-and-publish-forms/edit-pages-and-components.md).

# Edit Pages and Components

Refine the structure, wording, choices, and behavior of your form.

Use the form assistant to make changes in plain language. Tell it what outcome you want, then confirm the result in **Outline** or **Preview**.

### Describe the change you want

Be specific about what should change and where it belongs.

Generally, a useful request identifies some or all of the following:

* The page or question you want to change
* The desired result
* Any tone, exact wording, or response choices
* When the question or page should appear
* Anything that should remain unchanged

For example:

> On the Contact details page, change “Phone” to “Mobile phone number” and make it optional. Do not change the email question.

For more predictable results, follow these guidelines:

* Make one related set of changes at a time.
* Use the page or question’s current name.
* Provide exact wording when it matters.
* State what should remain unchanged.
* Describe conditional behavior in everyday language.

### Edit pages

Ask the form assistant to change how the form is divided and organized. When possible and before sending your request, select the relevant page in **Outline** by clicking it. The selected item appears above the message field, helping the form assistant focus on the correct part of the form.

You can ask it to:

* Add, remove, or reorder pages
* Move questions between pages
* Combine short pages or divide long pages into smaller sections
* Show a page only when an earlier answer makes it relevant

For example:

> Combine the two contact pages into one page called Contact details.

or

> Show the Insurance page only when the person says they have insurance.

### Edit components

Ask the form assistant to change how components appear, how they are ordered, or how to apply logic to them. Before sending your request, you can select a page or component in the **Outline** to automatically reference it in the discussion bar and tell the form assistant exactly what you want to change.

The selected component reference gives the form assistant the context it needs, so you don't have to identify the question by name in your message.

You can ask the form assistant to do things like:

* Add or remove a question
* Rewrite a question label
* Change the type of information collected

The form assistant can also change a question's type - for example, from a select question to a free-text question - or update the available answer choices for questions that have a list of choices.

For example:

> Move the preferred contact method question directly after the email question.

> Rewrite the "Describe your issue" question in a more conversational tone.

> Replace the first choice with "apple" instead of "orange".

You don't need to select an existing element when adding a *new* question. Instead, name the page and describe where the question should appear.&#x20;

### Making questions optional

Answer components in Rooks are required unless you specify that they should be optional. A **required** question must be answered before the person can continue on with the form.

To make a question **optional**, select it in the **Outline** or name the question in your request, then ask the form assistant to make the change.

If a question applies only in certain circumstances, it may be better to control when the question appears by using [**conditional logic**](/build-and-publish-forms/add-conditional-logic.md) instead of showing it to everyone as optional.

### Validate answers

Rooks can check an answer’s format or apply limits before allowing the person completing the form to continue. Some validation is applied automatically based on the question type, while other rules can be added by describing them to the form assistant.

<table data-search="false"><thead><tr><th>Question type</th><th>Available validation</th></tr></thead><tbody><tr><td>Email</td><td>Checks that the answer uses a valid email format.</td></tr><tr><td>Phone</td><td>Checks US phone numbers by default. </td></tr><tr><td>Address</td><td>Requires the main address fields and checks that a US ZIP code contains five digits (only when the address uses separate fields).</td></tr><tr><td>Number</td><td>Can require an inclusive minimum value, maximum value, or both.</td></tr><tr><td>Date and date-time</td><td>Checks for a valid date and can limit answers to dates in the past or future.</td></tr><tr><td>ZIP code</td><td>Requires a five-digit input.</td></tr><tr><td>SSN</td><td>Checks that the answer follows a valid US Social Security number format.</td></tr></tbody></table>

To add validation rule (where applicable), use select the question to identify the question, then describe the rule in the chat bar. For example:

> Require a value between 18 and 120.

Validation follows the question type, not merely its label. A text question labeled “Email address,” for example, does not provide the same checks as an Email question.

Test the question in **Preview** with both accepted and rejected answers to confirm that the form behaves as expected.
