# Advanced: Automatically clearing Inputs

When using a HTML Input form field as an input to a smart contract method, DappHero will automatically clear the value of the input form field after each invocation (IE: each time someone click the submit button). This behavior was designed to give users a familiar experience when interacting with a DH powered and to make user their inputs are cleared.&#x20;

However there are some situation where clearing the input field might not be desired, so we have included the ability to override this functionality.&#x20;

### Overriding the default functionality

To override the default functionality, it is necessary to add `auto-clear` flag with a value, `true` or `false`. This should be added any input for which you wish to change the default functionality, or perhaps give the ability to change the functionality while loaded on the page.&#x20;

```markup
<input
    data-dh-property-method-id="000"
    data-dh-property-input-name="simpleMessage"
    data-dh-property-auto-clear="false"
/>
```

| Tag        | Property   | Required? |
| ---------- | ---------- | --------- |
| auto-clear | true/false | optional  |

If there is no `auto-clear` flag, DappHero will clear the input value after the first invocation.&#x20;

Learn more about using `auto-clear` with [invisible inputs](/features/using-smart-contracts/inputs.md#invisible-inputs).


---

# 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://docs.dapphero.io/features/using-smart-contracts/advanced-automatically-clearing-inputs.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.
