Create forms

Scroll Viewport comes with a set of form macros that let you create simple forms. When the user submits their form content, it is sent as an email to a configured email address.

Creating forms in Scroll Viewport is simple:

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

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 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.