# trigger\_event

Source: https://zotonic.com/docs/2115/trigger_event

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

Language: en



Trigger a named `{% wire %}` event in the browser. The required `name` argument identifies the wire; every other action argument is passed to the named event.

```django
{% wire name="refresh-preview" action={update target="preview" template="_preview.tpl"} %}
{% button text="Refresh" action={trigger_event name="refresh-preview" id=id} %}
```

In this example the named wire receives `id` as an event argument when the button is clicked.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2115?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/2115?language=en>)
