Sweet Forms - general information

Form designer

Create new form

FormDesigner

  1. To see the Form Designer submenu, you need to have the ‘form designer’ feature
  2. Open Form Designer and Create new
  3. A new window will open. Start by giving the form a name under the Form name and a page under Pages.

newform

Import form

importform

  1. You can import a form that you have exported earlier by clicking the Import Form option.
  2. You will be presented with a dialogue where you can upload the exported form (a file with the file type .survey)
  3. Click ‘import form’ or ‘import and open’

See also

To export a form, go to the form template list, click the 3-dot menu, choose actions, click the 3-dot menu at the bottom and select “Export form”. The form will be downloaded. After downloading the form, it can be imported.

Form templates

From the form template menu, you can access all the form templates existing in the system. You can open the form templates directly from the list, filter them or perform actions.

FormTemplates

Available actions:

Export form - this function exports the form to a .survey file which you can import to the same or another Sweet environment (a different version).

Delete form - this function deletes the form and all the answers, you can’t undo this action.

Create copy - this function creates a copy of the form.

Export answers - generates an excel-file with all answers that have been received per form.

ActionsForms

New form

NewForm1

General settings

You can see and edit the form name under the Form Structure.

formstructure

You can access the general form settings under the ‘settings’ option below the form name. All the different tabs have different settings for the form.

formsSetting

New form - general settings

Form structure

  1. Page - contains selections and questions. If two (or more) pages have been created, a ‘next page’ button will be shown in the preview.
  2. Section - consists of different questions. It can be set to 1, 2 or 4 columns layout.
  3. Question - there are several types of questions that the user has to answer
  4. Sub question* - exists only on some types of questions, for example, on Matrix
  5. Answer - different options available for some question types, for example: single answer or multiple answers.

StructureForms

Function on the page and question structure

Buttons plus maximize or minimize the tree view.

Button dots displays menu with more options for the specific part of the tree.

If the cross is shown, the row can be moved in the tree. Press and hold the pointer on the row to move it up and drown the tree.

If the question’s background is grey (when not hovered), it is active in the tree and the edit page to the right will show the settings for the active item.

pages

Editing

The edit section will show the settings for the active page, questions, section or the form in general.

question

Automatic preview

The preview shows how the form looks at the moment and will update in real-time as you make new changes.

preview

Validation warnings

The validation displays all the errors that have to be corrected before the form can be published.

Hover over the description and click on the error to navigate to the error in the form. You can also see errors in the form structure by the red highlighted text.

formsError

Actions

Test the form - opens the forms in a new window for you to test it

Publishing settings - opens the page with publishing settings to publish the form.

Save and close - saves all the changes and closes form designer (the form is not published)

Save - saves the changes you have made in the form (the form is not published)

FormsOptions

Create a new section or question in the form structure

  1. Click on the New section and type the section’s name
  2. Press enter
  3. The cursor will be automatically placed on ‘new question’

*You can use the tab key to move down the tree structure

Section

Change settings for a section

  1. Click the section that you wish to edit
  2. In the edit section, you see all the settings for that section
  3. With the template options, you can style section’s final looks
  4. The style option gives you more section styling options

EditSection

Change settings for question

  1. Click the question that you wish to edit
  2. In the edit section, you will see all the settings for that question
  3. At this point, you can change the question type (there are different options for different questions types)

MyForm

Score part 1

You can set a different score for different answers in the form. On every answer in the form, there is a tab called Score and colour. Here you can set a score and a predefined color to the answer. This can, e.g. be handy for risk analysis forms or other types of investigation forms. You can also display the current score for the user by adding a Show score question.

For1

Score part 2

If you go to the general form settings, you will find a tab called Score and colour. Under this tab, you can define and add colours. These colours will then be available for the different answers in the form. To add a new colour, simply click the Add new colour button and select the colour you want. Name the colour to choose it later easily.

For2

Question type

Single answer

The single answer is the default value when you add a new question. This type requires at least one answer added to the question. The single answer allows the user to pick 1 answer only.

You can change the way the questions look. Below there are examples of the same questions with different answer styles.

For3

Multiple answers

Multiple answers question type allows the user to pick 1 or more answers. The user can set the minimum and maximum allowed answers number for this question type.

You can decide how the questions will look in the form. Below there are examples of the same question with different answer styles.

For4

File upload

The file upload question type allows the user to upload a file to the form. If the form is answered on a phone or tablet, the user can also take a photo and upload it.

In settings, you can decide the accepted file types and the maximum file size.

For5

For18

Free text

Free text part 1

This question type generates an input field for the user.

In the settings, you can set validation rules and connect available data sources.

Validation

Using validation will let you decide what kind of format the input field should have. There are 4 standard validations: email, length, numeric and Regex (where you can create your own validation rule with Regex code).

You have to set an error text that will be shown when the field has the wrong formatting.

Slide22

Free text part 2

With the free text question, you can connect available data sources that will automatically fill in data from somewhere else into the field.

As standard, you will have Sweet data sources available, but you can add your own data sources from different external systems with some integration.

To connect a Sweet data source to a free text question, you must first go to publish settings and choose the objects on which you want to publish the form. If you, for example, select Case, you will make the data source for Case available for your text field.

After choosing an object, you can go back to your free text question, click the data source tab and choose the field you want to connect.

Slide23

By checking “Always get latest data” you will tell the form to populate the text field with data from the object every time you open the form.

If you do not check “always get latest data”, the form will only fetch the data from the object once (the first time you open the form).

Checking “Save to data source” will let you save the data from the form and update the field in the actual object.

Free text multiple rows

This question type works exactly like the regular free text question but allows the user to write down several rows of text instead of 1.

For9

Information

The information question type will display the text you write in the description section for the question.

You can also write HTML and inline-CSS in this field, which gives you the opportunity you create designed content instead of only plain text.

Slide25

List

The list question will create a row with one or more sub-questions. These sub-questions can be the following types:

1.Single answer

2.Multiple answers

3.Date and time

4.Free text and Free text multiple rows

5.Information

6.File

7.Code group

Under appearance, you can choose to display the list as a table or as the default layout. See examples to the right.

You can select how many rows should be added per default when the user opens the form under the Pre added rows settings.

Under the answer rules, you can set how many rows that need to be added. Here you can set both a minimum and maximum value.

For11

Date and time

This question type generates a calendar field where the user can set a date and time into the form.

You can choose to show only date, only time or both date and time in the settings.

For17

Date interval

This question type generates a calendar field where the user can set a date and time interval.

In the settings, you can decide to show time or not.

For16

Code group

Code group part 1

The code group type creates a drop-down field in the form. To this field, you can connect a Code group from Sweet that will be displayed as answers.

This can be useful if you have several questions with the same answers and want to manage the answers from one place. This function works across different forms as well.

To set up this question type, you will first have to go to the Codes admin under Admin –> Metadata.

From the list, you choose a code you want to add to the form. Now you will see the whole code group and all of its codes. Copy the code group key by selecting all text (in the key) except the last dot and the part after the dot (see below).

For14

Code group part 2

You can open your form and paste the key into the Code group key field under the question settings. Press the button to load the code group into the form.

Note that if the code does not have a caption, the key will be shown instead, see the example below.

Slide30

Question type - Matrix

On the matrix question type, you can define both answers and sub-questions.

There are two types: Matrix single answer and Matrix multiple answers.

Matrix

Show score

This question type will display the current score of a form through a donut chart.

For this question type to work, you need to use the Score functionality on at least 1 question in the form.

ScoreColor

Sign

The sign question type creates a field where the user can sign with the finger, touch pen or mouse pointer.

The user can clear the signature to redo it or lock the signature when the signing is done. This will lock all the answers on the form with the “Lock on sign” checked in the settings.

For15

Visibility rules

How to apply visibility rules

Depending on the user’s answers, you can easily hide or show pages, sections or questions in the form. Below is an example explaining how to do this:

  1. Be sure to have a question that should trigger the visibility rule. E.g. a single answer question with some answers.
  2. Go to the part of the form you want to show or hide, depending on the user’s answer. This can be a page, section or question. Note that this part has to be somewhere after the trigger question in the form. Click in the visibility tab.
  3. Let’s say we want only to show this part of the form when answer 2 is chosen. In this case, drag n drop “Answer 2” from the tree structure to the left into the grey area in the Visibility tab. You have created a condition for the visibility rule.
  4. Now, that part of the form will only show if Answer 2 is chosen. See the first image on the next page.

Slide35-1

Slide35-2

You can also negate the rule that you just added. This means that the opposite will be true instead – the part will only show as long as Answer 2 is not chosen. See the last image.

You can do this by hovering the condition and clicking the crossed equality sign icon.

You can apply as many conditions as you want to a visibility rule by dropping more answers to the condition area.

If you have more than one condition, you can decide if all of those conditions need to be fulfilled or if it’s enough with any of them. To change this, hover over all conditions should be met, click the 3 dot icon and choose any condition should be met.

Both Answer 1 and Answer 2 will trigger the visibility independent of each other.

Slide36-3

Both Answer 1 and 2 need to be answered to trigger the visibility.

Slide36-4

Slide36-1

Slide36-2

Data sources

All free text questions can be connected to data sources. This function populates data from an object in Sweet to the form.

Moreover, data can be updated from the form to the object.

To enable data sources, you need to have at least one free text field and choose at least one object to publish the form on, under the publish settings tab.

For19

Data sources - set up

  1. Be sure to have a free text field in the form
  2. Go to publish settings and click on the object(s) on which you want to publish the form.
  3. Go to your free text question and open the Data sources tab. Here you will see a list of all available data sources.

4.Expand the data source you want to use. You will see a list of all the fields on that data source.

5.Select the field you want to use. The field is now connected to the free text question.

6.If you click “Always get latest data”, the form will check if the data from the object has been updated every time you open the form. If the data has been updated since last time, the form will populate that data instead. If this option is left unchecked, the form will only populate the data from the object the first time you open the form.

7.Click “Save to data source” to update the field on that object directly from the form. If the information is updated in the form, it will be saved to the object as well.

For20

External data

The external data functionality gives you the option to populate external data in the form (through Sweet Automation). The user will then be able to search for data through a search field, and the result will be populated in chosen fields in the form.

You can easily connect Sweet Automation as an external data provider by adding the correct credentials under Admin > Connections, when you have an account.

For34

  1. Add external data setup. More than one can be added
  2. Available connections
  3. Available selections within the chosen connection
  4. Name of setup *optional
  5. Search field settings. Here you choose what field the user will search for, e.g. organisation nr.
  6. Clicking this check box allows you to add a static value that the connection will use to search for results. Value is set in field 7.
  7. If the static value is unchecked, you drag & drop a free text field from the tree structure to use it as input for the search.
  8. Adds another search condition.
  9. Specify how many search results you want to fetch. If more than 1, you should use free text fields inside a list question to show more than one result.
  10. Mapping of search output. The available fields are displayed in the drop-down. You match the fields in the form with the output by dragging & dropping free text questions from the tree structure.
  11. Adds another search output row
  12. Removes the external data setup.

For21

Example:

The user who answers the form will be able to search for the Company organization number in the first free-text field. This functionality is specified under the Matching settings.

The organization search free-text field has a validation for org nr.

The result is set to show only 1 result per search. If we want to show more than 1 result, we need to use a list question with free-text fields.

The result’s output is set to show: Company name, Address, County and Zip code. The result is mapped to corresponding fields in the form (see arrows)

Once the user types in a correct org nr in the form, the search will begin and populate the result in the mapped fields

For22

The search field(s) connected to the external data function needs some validation to work.

You add the validation as usual on the free text field you have chosen to use as ‘search’ in the external data settings.

The search will trigger as soon as the field is validated. Therefore, it can be good to use the “Validate when leaving field” if the user should search for something more generic than, e.g. an organization number.

Once you have configured your external data, you must publish your form to activate and test it.

For23

Publish a form

When you are ready to publish a form, you go to ‘publish settings’ by clicking the button at the bottom or Settings > Publish settings.

For24

  1. Checkbox to publish the form
  2. Publish start and end date (optional)
  3. Makes the form anonymous. If this is checked, you can have the form public without having users log in to access the form.
  4. A list of objects in Sweet that you can publish the form on

For25



  1. A list of all versions of the form
  2. Checkbox determinating for which version the form should be published
  3. Publish start and end date
  4. Dates when the form version was published and unpublished
  5. Buttons to test the form version

For26

Published version logic

If you have several versions of a form, you can choose which version should be published. The URL to the form will always point to the latest version of a form set to be published (2). E.g. if both versions 2 and 3 are set to be published, the URL will go to 3rd version of the form

Publish a form - create a new version

As soon as someone has opened a published form answer set, you need to create a new version of that form if you want to add any changes to it.

You will notice when you open the form template again that it is locked.

Click the Create new version button to creating a new version and unlocking the form for editing.

When you click Create a new version, you will see a dialogue asking if you want to unpublish the previous active version.

Yes = The current published version will be unpublished. The form will become available for users when you publish the new version.

No = The current published version will still be published and available for users. When you decide to publish the new version, the form will be replaced by the latest version.

For27