> For the complete documentation index, see [llms.txt](https://docs.lineverge.com/automail/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lineverge.com/automail/configurations/workflow-configuration/sync-workflows/autoform-nav-elements.md).

# Autoform Nav Elements

**autoform\_navs** contains the content of each Autoform link. It has a nested structure and Autoform uses recursive algorithms to access/set its content.

The sync function infers as much as possible from the models to avoid redundant configurations.

## Base Structure

The base structure is as in the following example, which has 2 navs (meaning two menu items on top of the page), with labels "Nav Label A" and "Nav Label B" respectively. Each nav has 1 child, with category "handsontable" that will display a table in Autoform.

```python
"autoform_navs": [
    {
        "label_map": {
            "en": "Nav Label A",
        },
        "children": [
            {
                "label_map": {
                    "en": "Table A",
                },
                "attributes": {
                    "required": True,
                },
                "item_name": "nav_label_a",
                "category": "handsontable",
                "table_settings": {
                    "options": {},
                },
                "table_columns": table_columns_a,
                "table_data": table_data_a,
            },
        ],
    },
    {
        "label_map": {
            "en": "Nav Label B",
        },
        "children": [
            {
                "label_map": {
                    "en": "Nav Label B",
                },
                "attributes": {
                    "required": False,
                },
                "item_name": "nav_label_b",
                "category": "handsontable",
                "table_settings": {
                    "options": {},
                },
                "table_columns": table_columns_b,
                "table_data": table_data_b,
            },
        ],
    },
]
```

## Child Elements

The below section shows code snippets illustrating how to use the different child elements.

### "category": "input"

#### **type="text"**

#### **type="textarea"**

#### **type="number"**

#### **type="email"**

#### **type="**&#x64;at&#x65;**"**

#### **type="radio"**

Radio buttons are displayed automatically if the corresponding model field choices are less than 5.

<figure><img src="/files/960qAiGNwBFroHRzUE8T" alt=""><figcaption></figcaption></figure>

```python
{
    "model": custom_models.EcoPackMonitorPrimaryPackaging,
    "item_name": "has_hanger",
    # "category": "input", # inferred from the model field
    # "type": "radio", # inferred from the model field
    "label_map": {
        "en": "Packaging that is part of the product<br><strong>Is there a referenced hanger?</strong>"
    },
    "attributes": {
        "required": True, # inferred from the model field (False if the field is nullable, else True) - it is overwritten here
    },    
    "children": [],
},
```

Corresponding model field name:

<pre class="language-python"><code class="lang-python">class EcoPackMonitorPrimaryPackaging(ModelMixin):
<strong>    has_hanger = models.BooleanField(choices=TRUE_FALSE_CHOICES, blank=True, null=True, verbose_name="Is there a hanger?")
</strong></code></pre>

#### **type="**&#x72;angeslide&#x72;**"**

####

#### **type="checkbox"**

### "category": "handsontable"

### "category": "upload"

### "category": "group"

### "category": "card"

## Nested Children

Each child can have 0 to many children, which will be displayed as nested elements.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.lineverge.com/automail/configurations/workflow-configuration/sync-workflows/autoform-nav-elements.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
