The Forms plug-in allows you to create, edit, and publish forms on your website, and use them to collect data for various purposes, including but not limited to:
Responses can be saved to the database and/or emailed to a list of addresses.
There are two ways to create a new form:
If starting from scratch, you will be asked to define:
You can edit these settings later, using the configure tool.
To manage a form or its responses, click on the form name in the list of forms you have available. You will be presented with a toolbar that has the following options:
Use the configure tool to configure the form behaviour. The form-specific configuration parameters are:
There are two ways to add new questions to the form:
When creating questions from scratch, the configuration options will automatically change to those that are appropriate for the question format you selected.
Question formats are explained below.
To change the order of questions, click the order button. Drag the questions into their new order, then click the save order button.
Note that if you have a custom form layout, the presentation of the questions is fixed by that layout. Re-ordering the questions will not change how the form appears. It will still change the order in which questions are shown in reports and exported data.
Similarly, if you use a custom layout, you can reposition questions in the layout without altering the question order.
In the form configuration, you have a few security options to control who may use the form.
The access level determines who may submit responses to this form. Anyone of the selected access level or higher may post responses. Individual questions can also specify their own access levels; underprivileged users simply do not see those questions.
There are a few flags you can make use of to limit form abuse by users or robots:
Additionally, you can disable a form by changing its status from published to some other setting, for example:
By default, when a form submission is received, the system will return a simple "Thank You". You can specify a custom reply message by clicking the reply button in the form configuration screen.
The custom reply message can include HTML mark-up, and also merge fields that will be replaced with appropriate data when displayed to the user. Merge fields are written like this: ((name)), where name is any of:
If you would like to receive a copy of all responses submitted to a form, enter the email address to send to in the form configuration screen.
From the questions button in the general form overview, you get a table summarizing the questions on the form.
When you click into a question, you have options to preview, configure, or delete that question, as well as customize the layout.
If you delete a question, you also delete all answers that have been given to that question by any previous respondents.
Questions have many configuration settings:
Format | Example | Notes |
---|---|---|
short text | ||
long text | ||
select | ||
multiselect | use click-drag, shift-click, and ctrl-click to select more than one option | |
radio | choice 1 choice 2 |
|
radio+other | choice 1 choice 2 other: |
|
checkbox | yes | |
checklist | choice 1 choice 2 choice 3 |
|
checklist+other | choice 1 choice 2 choice 3 other: |
|
password | ||
hidden | Input is invisible, but is included with the form post. | |
label, preformatted | Any text or instructions you want to include in the middle of the form, but which does not actually ask for input. | Simple way to include instructions, headings, or section breaks in mid-form. |
file | ||
number | limited browser support | |
range | limited browser support | |
date | limited browser support | |
time | limited browser support | |
url | limited browser support | |
limited browser support |
By default, individual questions are presented like this:
question input
For example:
For checkboxes, the layout is input question
, for example:
If these defaults are sufficient, there is nothing more you need to do. But if this is inadequate, you can customize the question layout.
To make a custom question layout, use the question layout tool (not the form layout tool!) to update the question, and this new revision will be used as the question layout. You can place the question and input field in your layout using the tags [ [prompt
] ] and [ [input
] ].
If you leave [ [input
] ] out, it will automatically be appended to the end of your question layout.
Custom question layouts are useful in the following cases:
Example (specialized placement of input field):
input
] ], agree to the terms and conditions.
This will appear like (using a placeholder hint):
The question itself (Full question, as displayed to the user) is normally limited to 255 characters. If you have a lengthly question that requires more characters than this, use the following procedure:
prompt
] ] code in your question layout; just type your full question as you would like it to appear.Responses can be viewed and exported using the responses tool. You can also use the stats tool to get an overview of the responses, with charts.
Note that you can submit responses to the form directly from the preview screen. When you post to the form, it will take you to the form's page on the live site.
If responses require more complex processing or workflows, you can use the response status code to manage that. Every response can be given a status code, which determines where the response is at in its processing. Response status codes are:
Archived and rejected responses are considered inactive and will be excluded from stats reports. All other response status codes are considered active.
Response status codes are optional. By default, responses do not have a status code, and are functionally equivalent to "completed". Responses with no status code are still considered active.
To enable status code processing, configure your form and set the Submission Status. All new responses will be set to this status to begin with.
To manually process responses to change their status, use the configure tool in the response options.
The response status is included in the response reports. Use the filter tools to select only responses of a certain status. By default all responses are selected.
Responses can be viewed using the responses button in the form overview. Responses are listed in a table with the following columns:
This information can be exported in various formats using the links in the footer.
Use the search tool to look for a certain text string in the data. (Note that exports will include all data, not just the ones that match your search. To export filtered data, use the filter options.)
Click on the Report Filters bar to get options for filtering the responses report. You can select:
After performing a filtered search, you can adjust your report filters, or you can export the selected set of answers.
To get a simple overview of all responses received, use the stats button.
Each question is summarized, including the total number of answers received, and a % of all responses that answered that question. These statistics are summarized in a simple bar chart.
For multiple-choice answers, each answer option will be shown separately, with a count and % of responses that selected this answer. If the answers are numeric, it will also compute an average.
The stats can be exported in different formats:
In some applications, you may need to do extra administration/processing on responses before they are considered completed. For example, consider a support request form; you might need to track whether the request has been assigned to a customer support rep, and whether the issue has been resolved.
You have two tools at your disposal for this work:
Both of these workflow tracking tools can be used to filter responses in reports to help you identify the responses that require attention.
Note that summary/stats reports (including the executive summary) will exclude responses whose status has been set to archived or rejected. Use archived to indicate that a response has been dealt with satisfactorily and should no longer be included in those summaries. Use rejected to exclude junk or spam responses.
Forms will automatically be given a simple and versatile layout. If you need to customize this layout, you can create a custom form layout. Your form layout is a block of HTML containing merge codes that determine where your questions will be placed.
For experts only! Custom layouts override your question ordering, and increase the amount of work you need to do when adding or removing your questions, since the layout also has to be modified to support your new question list. Only make use of this feature if this extra work is worth the effort. For similar reasons, it is best to setup your layout after your questions are settled and stable.
You can place whole questions using the question name. For example if you have a question whose short name is email, you can place it into your form layout using [ [email
] ]. The entire question and input field will be substituted into that position. If you need to be more specific than that, use [ [email:prompt
] ] or [ [email:input
] ] to substitute just the question or just the input field.
If you neglect to include all question inputs, the missing ones will automatically be appended to the end of your form layout. If you neglect to include all prompts, the missing ones will be ignored.
The forms subsystem automatically generates useful form layouts, so that you don't have to. You can access these automatic layouts in the accordion panes below the layout editor. Copy-and-paste these (or sections of these) into the layout editor, and then modify to suit your needs.
Some forms, such as assessment quizzes and customer surveys, require lengthly preambles to explain the process of using the form or other things the respondent may need to know before filling out the form. The preamble can simply be put at the top of the layout, as free-form text.
If you do not require any special layout of the actual form inputs, then do not include any of the merge codes in the layout. Only type in your preamble. Since any missing form elements are automatically appended, your form should appear right after the preamble with no extra work.
When possible, the system will try to enhance your form layout by grouping questions with similar inputs. For example, if you have multiple questions in a row with the same set of radio button answers, then instead of the generic layout, which would be:
Question A:
yes
no
maybe
Question B:
yes
no
maybe
You will instead get a matrix of radio buttons:
yes | no | maybe | |
---|---|---|---|
Question A | |||
Question B |
This helps to automatically group similar questions in surveys and other long forms, to keep things more organized. To take advantage of this feature, simply make sure that these questions are adjacent to each other in the form. If you have adjacent questions that you do not want grouped in this way, you can configure questions to not group themselves by checking off "do not group" in the question's configuration settings.
Radio buttons and checklists consist of a number of sub-inputs. If you want to place these sub-inputs individually, they are numbered starting at 1, and you can place them individually using:
[ [name:input:N] ]
where N is the number of the sub-input. Note that this only places the sub-input, not any text that goes along with the sub-input.
The sample layouts at the bottom of the layout page include a layout with matrixes that replicates the default matrix layout. You can copy/paste this to modify it.
Complex forms can be broken into multiple parts that are filled out and submitted separately. To make use of this feature, do the following:
After doing this, the user will be automatically directed to the next part after filling out each part in turn.
When you view a response from a multipart form, it will also display related responses from other parts of the form.
If a sub-part should only be shown conditionally depending on an answer given in the previous form, you can set the "multipart condition" configuration setting:
In these examples, question is the name of the question that the condition triggers on. For example, a condition like province=BC will select a form part if the preceding form part had a question named province and the user answered BC. If the condition does not match, that sub-part will be skipped, and the user will jump to the next form in the sequence.
Forms can be built in multiple languages in such a way that you can automatically switch languages when viewing a form, and multiple-choice answers can automatically be translated back to English for easier data analysis of responses (for instance 'yes' and 'oui' will be treated as the same answer). To create a translated form:
Translated forms will appear in your form listing right below the original English form. Responses received to translated forms are kept under the original English form, so that all your data is kept together in one place for easier data analysis. Multiple choice answers are automatically translated back to English for better statistics and filtering. If you do need to know who responded in other languages, the language of the response is also shown in the response reports.
The way translated content works is that the CMS looks at the original to see what content should appear. It then looks at the translation to see what translations of that content exist. If a translation exists, it is used in place of the original; if not, the original is used as a fall-back. This means that your translated form will automatically make use of the original English questions to begin.
You now have to translate each of your questions in a similar way. There is a fast way to do this: when you preview the form, the CMS will detect that the translations are incomplete and display warnings. It will give you a button to fix the warnings, which clones all of the English questions and puts them into your translated form so that you can edit them.
Once your questions are in place, you can visit them individually to translate them. You will need to translate:
Any form named "form" and placed in a registration fee will automatically be used as the registration form for that fee. A form can also be placed in the event, and it will be shared by all fees in that event. The Registration module has a forms tool that will take care of setting this up for you. It is good practice to include fields named first_name, last_name, and email (and optionally, organization) to make it easier to identify the registrant. It is usually not necessary to collect detailed contact information (eg. address, phone number), because that is collected on the billing screen at checkout anyway, which is sufficient for most events.
Any formed named "application_form" and placed in a membership_type will automatically be used as the application form for that type of membership, and any membership types within it. The Membership module has a forms tool that will take care of setting this up for you. The membership system will try to create a profile and user from information provided on the form, so name your questions appropriately. Question names like the following will be recognized and used: first_name, last_name, organization, login, address, city, provstate, country, pcode, phone, email. Additionally, any question that matches the name of any profile setting will be used for that setting.
Turn your form into an e-commerce order form by checking off the order form option in the form configuration. This will enable the pricing tool that lets you set a price (or different pricing levels depending on the user's access level or the date) to purchase whatever the order form is selling.
When the user fills out the order form, an item will be added to their shopping cart, which they can then checkout and pay for. The item description will be either the price description, or the order form's title, and the item details will include all non-blank answers in the order form.
To get taxes, shipping, or other surcharges, set the price accounting codes appropriately.
If you are holding a special election or ballot, you want to make sure that people only vote once. Select the option "single submission only" in the form configuration. This only works on restricted-access forms. Set the form access to user level or higher. That means that people need to log in before they can vote, which is how we validate their identity.
Note that people can actually vote as many times as they like, but each vote will replace their previous vote, so that only a single vote is recorded for any one UID. That makes it easy for people to revise their choices if they change their mind.
The stats or executive summary can be used to report election results without revealing individual voter choices.
You can build quizzes and tests using a special extension to the Forms module, the Quiz module. It allows you to setup forms with answer keys, time limits, and automatic marking. Consult the help documentation in that module for details.