A NSW Government website

Our website uses an automatic service to translate our content into different languages. These translations should be used as a guide only.

demo dds
Department of Demonstrations

Forms

Ask a set of questions and email or store the answers. One block, with the questions inside it as fields.

What it is

A form asks a set of questions and does something with the answers — emails them, stores them, or both. It is one block: the questions live inside it as fields, and a field exists nowhere else, so there is no separate block to add for a text box or a dropdown.

One page can hold several forms, and a form can be reused across pages so the answers pool in one place.

How to add it

Add a Form block, give it a title, then add fields to it from the bottom of the form. Each field asks one question. Set the submit button's wording, and enter the address answers should go to.

Configure it

Submissions decides what happens to an answer. Email it to one or more recipients — you can set the reply-to address and the subject line — store it as a CSV you can download, or both. You can send the person an acknowledgement, attach the answers as XML for another system to read, and require a captcha before the form will send.

Store the answers, acknowledge the sender, and protect the form

Fields are the questions. Every field has a label — the question itself — optional help text under it, and whether an answer is required. Most also take a placeholder and a default answer, and the whole form can offer a reset button beside submit if you want one.

The type decides what someone is given. For words: Text for a line, Long text for a paragraph, and Static text to say something in the middle of a form without asking anything. For facts: Number, Email address, and Date — a calendar picker, three boxes for a date someone already knows like a birthday, or both together so it can be typed or picked. For choices: Dropdown, Radio buttons, Checkboxes — which can be shown as tick boxes, as a dropdown, or as tags — a Single checkbox for one agreement, and Yes / no. For everything else: File upload, which can limit the file types it offers, and Hidden value, which carries something you need but never asks for it.

A question that offers choices can take them from a list the site already keeps, rather than typing them out. Set Options from and the options are the list's entries — and they stay right as that list changes, which a typed copy does not: the departments move on and the form goes on offering last year's. Leave it empty and you write the options yourself, which is the better answer when they belong to that question alone, like how someone heard about you.

Add each kind of question, and set what it asks for

Answer rules check what someone typed before the form is accepted — a minimum or maximum length, a number range, an earliest and latest date, or a pattern the answer has to match. The message you write is what they see when it does not.

Set the rules an answer has to meet

Conditions make one question depend on another answer. Say which field it depends on, the comparison, and the value — and then what should happen when it holds.

A question can wait until it applies, and appear only then. It can stay in place but closed, so someone can see what will be asked without answering it yet. Or it can be answered already and not theirs to change — still sent with the form, just not retypable. Someone answering “no” is never asked the three questions that follow from “yes”.

One rule: show a question, close it, or keep its answer as it is

Reuse a form from another page points this block at a form that already exists. The same questions are asked here and the answers pool with that page's, so one definition can be collected from several places. Only the title and description stay local, so it can be introduced differently wherever it appears.

Tips

Ask for the least you need. Every extra question costs completions, and anything you collect you then have to look after.

Use a dropdown when there are more than a handful of options, and radio buttons for a few mutually exclusive ones. Order long lists in a way that helps — alphabetically, or most-common first.

Use three separate day, month and year boxes for a memorable date like a date of birth, and the calendar picker when someone is choosing from a range, like an appointment. Ask for a four-digit year.

Write help text as the hint you would say out loud — the expected format, or what a good answer looks like — rather than repeating the label.

A search block's filters are built from the same field types, and answers can be listed with a listing.

Example

Whole forms

Ways to ask a question

All fields marked with an asterisk are required.

Two or three sentences is plenty
We will only use this to reply
Date of birthFor example 08 12 1990
A calendar for a date being chosen.
Date of birth, with a calendarType it, or pick it from the calendar — the calendar fills the boxes in.
How did you hear about us?
Which days suit you?
PDF or an image, up to 5MB
It starts with NSW and is on your letter
Please include dates

The next few questions are about how to reach you.

How would you like us to reply?We will only use this once
Which of these apply to you? (required)
TopicsThe same question as the tick boxes above, drawn as tags.

One answer, three consequences. Say you have contacted us before and the reference number appears, the case officer is filled in but not yours to change, and the reply choice opens up. Say you have not and the reply choice stays closed where you can see it.

A question that depends on another answer

Answer the first question either way, and watch the three below it.

Have you contacted us about this before?
On the email we sent you.
How would you like us to reply?

An error is what a submission produces, so this example asks the form to render as though it had been submitted with nothing filled in.

What it looks like when something is missing

Every question here is required, shown as it appears when someone submits without answering.

All fields marked with an asterisk are required.

As it appears on your identity documentEnter name
Maximum 500 charactersEnter comment
Date of birth (required)For example 08 12 1990
Enter date of birth
Your region of residenceSelect an option for Region
I agree to terms and conditions must be ticked to continue
Category (required)Select all that applies to youSelect at least one option for Category
Topic (required)Select closest matchSelect an option for Topic

What it looks like when an answer has been checked

The same questions, each carrying the message that its answer has been checked.

As it appears on your identity documentThis field has been validated
Maximum 500 charactersThis field has been validated
Date of birthFor example 08 12 1990
This field has been validated
Your region of residenceThis field has been validated
This field has been validated
CategorySelect all that applies to youThis field has been validated
TopicSelect closest matchThis field has been validated
Help text
Help text

All fields marked with an asterisk are required.

Date of birthFor example 08 12 1990
Date of birth, left unanswered (required)For example 08 12 1990
Enter date of birth, left unanswered
Your region of residence
CategoriesHelp text
RegionHelp text
Formats accepted: JPG, PNG or PDF