> 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.
