insert_before

Insert the result of a render action before an HTML element.

It accepts the same arguments as the action#update action: use text for literal HTML or template to render a template. All additional arguments are passed to that template. catinclude, include_all, and appear are also supported.

{% button text="Add warning" action={insert_before target="submit" template="_form_warning.tpl"} %}

Edit on GitHub