# Mandatory or optional fields

Optionality is complicated.

Mandatory fields may have these unintended consequences:

* Mandatory questions can make a user give up and not fill out the form.
* Mandatory questions can add to a user’s frustration if they cannot answer the question.
* When we ask someone a mandatory question a user cannot answer, we are teaching them to lie.
* Mandatory questions assume this is your final chance to give that information. But many forms with the City are the beginning of a conversation, like in Cannabis or Building permitting.

Rather than require a field that cannot be answered, make a question optional or re-write the question to make an easier question required.

| <p>Do</p><p></p>                                                                                                                                         | Do not                                                       |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| <p>Have you hired a contractor? \*</p><ul><li>Yes, I hired a contractor.</li><li>No</li><li>Not yet</li></ul><p><em>If yes, name of contractor.</em></p> | <p>Contractor name \*</p><p></p><p></p><p></p><p></p><p></p> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sfdigitalservices.gitbook.io/style-guide/how-to-write-forms/mandatory-or-optional-fields.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
