Skip to main content
Skip table of contents

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:

  1. Add a Viewport Form Container macro to a Confluence page
  2. 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.

ParameterRequiredDescription
NameYESName
HandlerYES

What happens with the data after it is submitted

Spam Protection 
  • none – no spam protection measures are taken.
  • simple – the form will create an additional field named url, that is hidden to human users with CSS. A spam bot will (most of the time) not make the difference and will fill the URL that it is trying to advertise. Using that different behavior Scroll Viewport will dismiss all form submits that try to submit a URL
Success Message Message for the user after submitting the form
Email to AddressYES

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:

MacroDescription

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:

ParameterDescription
NameSpecifies the name of the element.
RequiredSpecifies that an input field must be filled out before submitting the form.
LabelDefines a label for the element.
DescriptionDefines a visual description next to the element for the user
SizeSpecifies 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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.