Create a Form
Use a collection of macros on a page to create a simple form for your website.
When a user submits the form, the data is sent as an email to a configured email address.
To create a form:
- Add a Viewport Form Container macro to a Confluence page
- Add your required form element macros to the body of the Viewport Form Container macro
Add and Configure a Viewport Form Container macro
This macro is the first step into adding forms to pages in Confluence. The purpose of this macro is to define what happens with the form's data after it's submitted.
Parameter | Required | Description |
---|---|---|
Name | YES | Name |
Handler | YES | What happens with the data after it is submitted |
Spam Protection |
| |
Success Message | Message for the user after submitting the form | |
Email to Address | YES | Address to which the data is sent |
Email CC Address | CC Address to which the data is sent |
Add Form Elements
After adding a Viewport Form Container, you can insert form elements using form element macros. Scroll Viewport comes with seven form element macros:
Macro | Description |
---|---|
Scroll Form Input | Creates a single-line text field that lets a user can enter text into |
Scroll Form Textarea | Defines a multi-line text input control |
Scroll Form Dropdown | Creates a drop-down list |
Scroll Form Select Multiple | Creates a list in which the user can select multiple options |
Scroll Form Checkbox | Checkboxes let a user select one or more options of a limited number of choices. These macros create a field of checkboxes |
Scroll Form Radio Buttons | Radio buttons let a user select only one of a limited number of choices. This macro creates a field of radio buttons |
Scroll Form Hidden | Define a hidden field (not visible to a user). A hidden field stores a predefined value. |
Configure the Form Elements
You can configure the form element macros using various parameters:
Parameter | Description |
---|---|
Name | Specifies the name of the element. |
Required | Specifies that an input field must be filled out before submitting the form. |
Label | Defines a label for the element. |
Description | Defines a visual description next to the element for the user |
Size | Specifies the size of the element. |
Values | Specifies the values that will be available for the user to choose. The input should be as list separated by commas. e.g. foo,bar,baz,qux In the case of checkboxes and radio buttons the word specified in this list will the elements label and value. |
Default Value | Should the form field contain an already selected or filled value, use this field to include the values. Just like the values parameter, use single values or a list. |