Basic Syntax

Scripting Custom Views

Rendering Variables

Variables are values which can be inserted into a view. They can be submission-specific, like the values of individual fields, or they can be user-specific, like the current user's name. You can even set your own from view templates.

Variables are rendered by surrounding the variable name with {{ and }} characters. While this is the same syntax as formulas, formula methods are currently not available in views.

Liquid Input
Hello, {{ user.name }}!
HTML Output
Hello, John!

Rendering Tags

Tags are functions, or generators, which accept variables and values and can return output. Liquid templates come with tags for comments and loops, among others. Sonadier provides a number of helper tags for generating things like form inputs.

Tags are rendered by surrounding their values with {% and %}.

Liquid Input
{% text_tag name: "name", label: "Text field label!", value: "value", id: "id" %}
HTML Output
<label for="id">Text field label!</label>
<input type="text" name="name" id="id" value="value" class="form-control">