{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2020-05-30T05:47:29Z","object_id":{"id":1303,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_wires","title":"mod_wires","uri":"https:\/\/zotonic.com\/id\/1303"},"seq":1000000}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"references":{"objects":[{"created":"2020-05-30T05:47:28Z","object_id":{"id":1279,"is_a":["text","documentation"],"name":"doc_glossary","title":"Glossary","uri":"https:\/\/zotonic.com\/id\/1279"},"seq":1000000},{"created":"2020-05-30T05:47:29Z","object_id":{"id":1417,"is_a":["text","documentation","reference","template_action"],"name":"doc_template_action_action_growl","title":"growl","uri":"https:\/\/zotonic.com\/id\/1417"},"seq":1000000}],"predicate":{"id":332,"is_a":["meta","predicate"],"name":"references","title":{"_type":"trans","tr":{"en":"References"}},"uri":"https:\/\/zotonic.com\/id\/references"}},"refers":{"objects":[{"created":"2026-09-09T13:48:14Z","object_id":{"id":1384,"is_a":["text","documentation","reference","template_scomp"],"name":"doc_template_scomp_scomp_button","title":"button","uri":"https:\/\/zotonic.com\/id\/1384"},"seq":1000000},{"created":"2026-09-09T13:48:14Z","object_id":{"id":1417,"is_a":["text","documentation","reference","template_action"],"name":"doc_template_action_action_growl","title":"growl","uri":"https:\/\/zotonic.com\/id\/1417"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"relation":{"objects":[{"created":"2020-05-30T05:47:29Z","object_id":{"id":1384,"is_a":["text","documentation","reference","template_scomp"],"name":"doc_template_scomp_scomp_button","title":"button","uri":"https:\/\/zotonic.com\/id\/1384"},"seq":1000000}],"predicate":{"id":303,"is_a":["meta","predicate"],"name":"relation","title":{"_type":"trans","tr":{"nl":"Relatie","en":"Relation"}},"uri":"http:\/\/purl.org\/dc\/terms\/relation"}},"subject":{"objects":[{"created":"2026-09-09T13:48:14Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:48:14Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-09-09T13:48:14Z","object_id":{"id":2598,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_messaging_and_pubsub","title":"Messaging and publish-subscribe","uri":"https:\/\/zotonic.com\/id\/2598"},"seq":3},{"created":"2026-09-09T13:48:14Z","object_id":{"id":2624,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_wire_action","title":"Wire action","uri":"https:\/\/zotonic.com\/id\/2624"},"seq":4},{"created":"2026-09-09T13:48:14Z","object_id":{"id":2673,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_javascript","title":"JavaScript","uri":"https:\/\/zotonic.com\/id\/2673"},"seq":5}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1630,"is_a":["text","documentation","reference","template_action"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1630"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_template_action_action_postback","page_url":{"en":"https:\/\/zotonic.com\/docs\/1630\/postback","x-default":"https:\/\/zotonic.com\/docs\/1630\/postback"},"preview_url":null,"resource":{"version":3324,"pivot_location_lat":null,"title":"postback","is_authoritative":true,"body":"<p>This action sends a message to the event handler on the server.<\/p>\n<p>Example:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{% button text=&quot;Go&quot; action={postback postback=&quot;go&quot; action={growl text=&quot;sent message&quot;}} %}\n<\/code><\/pre>\n<div class=\"admonition note\"><p class=\"first admonition-title\">Note<\/p><p class=\"last\">The <a href=\"\/id\/doc_template_scomp_scomp_button\" class=\"doc-reference doc-reference-scomp\"><code>scomp#button<\/code><\/a> scomp can also take a postback argument directly.<\/p><\/div>\n<p>After clicking the button the event go will be sent to the <a href=\"\/id\/doc_glossary#term-controller\">controller<\/a> module on the\nserver and an <a href=\"\/id\/doc_template_action_action_growl\" class=\"doc-reference doc-reference-action\"><code>action#growl<\/code><\/a> message will be displayed.<\/p>\n<p>The event\/2 function in the controller module will be called as:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">event(#postback{message=go, trigger=TriggerId, target=TargetId}, Context)\n<\/code><\/pre>\n<p>This action can have the following arguments:<\/p>\n<table class=\"table\"><thead><tr><th>Argument<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td>postback<\/td><td>The message that will be sent to the server module.<\/td><td><code>postback={my_message arg=&quot;hello&quot;}<\/code><\/td><\/tr><tr><td>delegate<\/td><td>The name of the Erlang module that will be called. Defaults to the controller module generating the page.<\/td><td><code>delegate=&quot;my_module&quot;<\/code><\/td><\/tr><tr><td>action<\/td><td>Any other actions that will be executed when the postback is done. This parameter can be repeated.<\/td><td><code>action={show target=&quot;wait&quot;}<\/code><\/td><\/tr><tr><td>inject_args<\/td><td>If set to true, and postback is a tuple (as in the <code>my_message<\/code> example in this table), any values from the args in the postback will replace the arg value in the postback argument. This is useful when the arg is coming from an outer action and not set explicitly in the template code (as is done in the example for illustration). The value of <code>some_arg<\/code> in the postback handler will be <code>123<\/code>.<\/td><td><code>{postback postback={my_event some_arg} inject_args some_arg=123}<\/code><\/td><\/tr><tr><td>qarg<\/td><td>Post the value of an input or select with the postback. The value of the <code>qarg<\/code> argument is the id of the element to be posted. Multiple <code>qarg<\/code> arguments can be given. On the server the value will be available as a normal query argument using <code>z_context:get_q\/2<\/code><\/td><td><code>qarg=&quot;my-input-id&quot;<\/code><\/td><\/tr><\/tbody><\/table>\n<p>New in version 0.9.0: Added inject_args option.<\/p>","slug":"postback","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"c6296256a709471ae8f39e21f037aed68f28159d488d710e425d9141df816936","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":326,"is_a":["meta","category"],"name":"template_action","title":"Actions","uri":"https:\/\/test.zotonic.com\/id\/326"},"doc_source_path":"apps\/zotonic_mod_wires\/src\/actions\/action_wires_postback.erl","publication_start":"2023-01-30T19:23:57Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_wires\/src\/actions\/action_wires_postback.erl","pivot_location_lng":null,"doc_source_kind":"action","name":"doc_template_action_action_postback","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:28Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_wires","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"fcd7360cf6d307f08dac71bede7378e2b4ac72f0\n","erlang_module":"action_wires_postback","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-01T12:53:31Z","title_slug":"postback"},"uri":"https:\/\/zotonic.com\/id\/1630","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1630"}},"status":"ok"}