•••
 
Documentation   /   Building templates   /   Forms and web pages
 
 

Forms and web pages

 

Forms

A Form template is completed online by its recipient and has a submit button instead of signatures. Typical uses are questionnaires, applications, onboarding forms and intake forms.

To build a form:

  1. Create a template with the Form document type.
  2. Write the form text, with a variable wherever the recipient answers something.
  3. Define each of those variables as a field with ---collect_data:true, so the field appears in the document.
  4. Put [[SUBMIT_BUTTON]] where the submit button should go. If you leave it out, it goes at the end.
<h2>New starter details</h2>
<p>Your full name: {{starter_name}}</p>
<p>Emergency contact: {{emergency_contact}}</p>
<p>Do you need a parking space? {{needs_parking}}</p>
[[SUBMIT_BUTTON]]
--#:
---name:starter_name
---type:text
---appears_on:extras
---collect_data:true
---required_on_collect:true
---mini_label:Full name

--#:
---name:emergency_contact
---type:textarea
---appears_on:extras
---collect_data:true
---rows:3

--#:
---name:needs_parking
---type:dropdown
---appears_on:extras
---collect_data:true
---options:"Yes","No"

---required_on_collect:true makes the recipient complete a field before submitting. ---required applies to the creation form instead.

Send the form to people with a workflow (auto_document with ---stage:send) or a public workflow link. Once it's submitted, a workflow can read the answers with {{alias:starter_name}}, and Data Studio can report on them.

Web pages

A Web page template creates a live page that stays editable. It has no signature block. Use it for portals, guides, status pages and dashboards.

On a web page:

  • fields with ---collect_data:true can be edited at any time, and [[SAVE]] adds a save button
  • [[INCLUDE=data(...)]] pulls in live data, refreshed every 15 minutes. See Pulling data into documents.
  • widgets show tables and scores. See Dashboards and widgets.

Links and buttons

[[LINK=https://example.com/policy]]Read our policy[[ENDLINK]]
[[BUTTON={{checklist_url}}]]Back to your task[[ENDBUTTON]]

Both accept variables in the URL. Links open in the same window.