# Form Rule Builder

Create conditional form options using the Rule Builder. No coding experience necessary.

<figure><img src="/files/zIJ5Y97siaGFoc6gMKv8" alt="" width="563"><figcaption></figcaption></figure>

For this guide, we will be using the following scenario as an example to assist in feature explanations.

Acme allows for a 2 day grace period when uploading receipts for invoice processing. Our admin has set up a column prompting a user to input "Yes" or "No" to the question, Do you have a "receipt?". For those that answer "Yes" he would like to reveal the fields "Vendor Contact" and "Receipt Photo". However, for those that answer "No", he would like to show a custom confirmation message, informing the submitter that they have 2 business days to submit their receipt to their manager or they will face fines.&#x20;

***

#### Field Rules

For the first part of this prompt, our admin will make use of the Field Rules section.&#x20;

<figure><img src="/files/aCgEqKTaPZZNRC712OcJ" alt="" width="563"><figcaption></figcaption></figure>

In this case, since an answer of "Yes" to the "Do you have an invoice?" field will have 2 actions occur, our admin will need to set up two rules. Rules can be further defined with the additional condition modifier "AND" by clicking the green "+" sign to the right of the rule.&#x20;

Our admin will set up the rules:

Rule 1

If "Do you have an invoice?" Is One Of "Yes"\
Then Show "Vendor Contact"

Rule 2

If "Do you have an invoice?" Is One Of "Yes"\
Then Show "Invoice PDF"

Setup like this, the fields "Show Vendor Contact" and "Invoice PDF" will only appear on the form if "Do you have an invoice?" is answered "Yes".

<figure><img src="/files/BUV4D6UVJNweq2HMQsNY" alt=""><figcaption></figcaption></figure>

***

#### Message Rules

For the second part of our scenario, our admin will utilize the message rules section.

Currently, the form has a default confirmation message of:\
"Thank you for your prompt and accurate expense reporting."

Our admin will create the following rule:

<figure><img src="/files/LMpOm40w21KRqCYm5dZa" alt=""><figcaption></figcaption></figure>

In this case, we can set up a single rule:

If "Do you have an invoice?" is Not One Of "Yes"

Then Confirmation Message "Please submit the Invoice pdf to your manager within the next 2 business days or you may face fines."

Now, when a user submits the form and has answered "No" to the question, they will receive the custom message.

{% hint style="danger" %}
If confirmation messages have been disabled in the Edit Form menu, no confirmation messages will be shown, even those set up in Rule Builder.
{% endhint %}

{% hint style="info" %}
Substitution tags can be used to insert dynamic data into the confirmation message.
{% endhint %}

<figure><img src="/files/Q1LmyuqW5klndasOXZAw" alt="" width="563"><figcaption></figcaption></figure>

Click **Save** and our admin is all done!


---

# 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://guides.mangoapps.com/user-guide/trackers/forms/form-rule-builder.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.
