# alert

Source: https://zotonic.com/docs/1486/alert

URI: https://zotonic.com/id/1486

Language: en



Show an alert dialog.

Example:

```django
{% button action={alert text="hello world"} %}
```

Shows an alert dialog with the text “hello world”.

Alert accepts the following arguments:

| Argument   | Description                                                                      | Example          |
| ---------- | -------------------------------------------------------------------------------- | ---------------- |
| title      | Title of the alert.                                                              | title=”Alert”    |
| text       | The text to be displayed.                                                        | text=”Hola!”     |
| button     | Text for the button. Defaults to “OK”                                            | button=”Bummer”  |
| only\_text | Set this to not show the “OK” button.                                            | `only_text`      |
| action     | Action to be done when the user clicks on the OK button. There can be multiple actions. |                  |
| backdrop   | Show backdrop: true, false, or the string “static”                               | `backdrop=false` |
| level      | Nesting of the dialog. Non negative integer, higher numbered levels are displayed above lower levels. Special level `"top"` to force display on top. | `level="top"`    |

The alert dialog is rendered using the `_action_dialog_alert.tpl` template. Overrule this template to change the contents of the alert dialog.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1486?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1486?language=en>)
