# Auto-fill for Custom Fields

The **Browser Extension** can be used to **auto-fill a web page** with custom fields that have been added to Items. A typical application of this is for **PINs** and **Security Questions** that are often required in addition to a **Username** and **Password** to login to a website.

Auto-field Custom fields can be created for the **&lt;form&gt;** or **&lt;input&gt;** **elements**. A special scenario is possible for **&lt;span&gt;** elements**.**

### Auto-Fill Custom Fields

Open the **Browser Extension** on the **Webpage** that you wish to auto-fill.

The **Tab** Screen displays.

It **automatically detects** the **URI** of the webpage and **displays** any **logins stored** in the **Vault** that correspond with this URI.

Select the **Vault Item** that contains the **custom field** to be auto-filled to the webpage.

[![copy custom field name - Copie.png](https://vault-doc.wallix.com/uploads/images/gallery/2023-12/scaled-1680-/copy-custom-field-name-copie.png)](https://vault-doc.wallix.com/uploads/images/gallery/2023-12/copy-custom-field-name-copie.png)

The Browser Extension finds any fields that **match** the **Custom field Name** and **auto-fill** that field's **value**.

<p class="callout warning">For this reason it is **important** to **correctly name custom fields**.</p>

### Linked Custom Fields

Sometimes the Browser Extension is **unable to auto-fill usernames and passwords** for a webpage. In these cases, **Custom fields** can be created for the username and password and these can be used **instead** for auto-fill.

From the [**Edit Item Screen**](https://vault-doc.wallix.com/link/9), add a New **[Custom Field](https://vault-doc.wallix.com/link/15)** of type **Linked.**

[![new linked custom field.png](https://vault-doc.wallix.com/uploads/images/gallery/2023-12/scaled-1680-/new-linked-custom-field.png)](https://vault-doc.wallix.com/uploads/images/gallery/2023-12/new-linked-custom-field.png)

In the **Name** field, give it the same name as the **HTML form element** (id, name, aria-label, or placeholder) for the field in question.

This can be found by clicking the **Copy custom field name link** in the Context Menu of the field in question.

For **example**, to find the HTML form element for the Master Password in WALLIX Enterprise Vault, click the Copy custom field name link.

The HTML form element for the Master Password is **saved** to the **clipboard**.

[![copy custom field name.png](https://vault-doc.wallix.com/uploads/images/gallery/2023-12/scaled-1680-/copy-custom-field-name.png)](https://vault-doc.wallix.com/uploads/images/gallery/2023-12/copy-custom-field-name.png)

**Paste** the HTML Form element into the **name** field of the **custom field** that you are creating for Master Password.

[![custom fields.png](https://vault-doc.wallix.com/uploads/images/gallery/2023-12/scaled-1680-/1QEcustom-fields.png)](https://vault-doc.wallix.com/uploads/images/gallery/2023-12/1QEcustom-fields.png)

From the **Value** dropdown, select **Password** in the case of a **Custom field for password** (as in the example above) or **Username** in the case of a **Custom field for username**.

This procedure is valid for Auto-field Custom fields can be created for the **&lt;form&gt;** and **&lt;input&gt;** elements.

### Auto-Fill for Span Tags

A **custom field** can be created for the **id** attribute of &lt;**span&gt;** elements if the **data-bwautofill** attribute is **present** in the opening tag.

In the following **example**, you could create a Custom Field with the **name** of **title**. An **auto-fill** would **replace** the **contents** of **title** (currently "WALLIX Enterprise Vault" with the **contents** of the **custom field**.

&lt;span **data-bwautofill** id=<span class="hljs-string">"**title**"</span>&gt;WALLIX Enterprise Vault&lt;/span&gt;