Sweet Forms - general information

Form designer

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

For28

Import form

importform

  1. Import a form that has been 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

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

FormTemplates

Available actions:

Export the 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 the 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 - this function generates an excel file with all the 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. Different tabs have different settings for the form.

For29

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 a 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 Matrix and List question type.
  5. Answer - different options are 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 a menu with more options for the specific part of the tree.

If the For32 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.

For41

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

Form warnings

The validation displays all the errors that must 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. Errors in the form structure are visible thanks to the red highlighted text.

formsError

Actions

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

Publishing settings - it opens the ‘publishing settings tab’ where the user sees all the publishing possibilities

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

Save - it 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 the 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 and colour

Under general Settings on the form, there is a tab called Score and colour. Under this tab, the user can define and add colours that will be available in the form. Click Add new colour button and select a colour from the colour palette and give it a name. Now colours created by the user will be available on the page, section, question and answer under the Score and colour tab. The user can define the colour of the answer for the whole page. If there are 2 different sections on this page, the user can define a new set of colours for answers in Section 1 and leave Section 2 with default settings set on the Page level. It is possible to change the colours of answers on individual questions.

Example on the bases of the image below.

  1. User adds a rule under the Score and colour tab on the page level saying that answers should be marked green.
  2. User adds a rule under the Score and colour tab on the section level (only section one), saying that answers should be marked red.
  3. User adds a different rule for colours on the Single answer question under Section 1.

Result:

All the answers on the page should be, by default, green if no other rule is set on the lower level of the tree form (section, questions). Because no additional rules were added to Section 2 - all the answers are marked green. In section 1 additional rule was added saying that all the answers should be marked red - for this reason, all of the answers under Matrix multiple answers 1 are marked red. Answers under the Single answer question have different colours because the special rules were set for this question on the answer level.

For43

You can set a different score for different answers in the form. Every answer in the form has 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.

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.

For5

You can decide the accepted file types and the maximum file size in the edit question settings.

For18

Note

When e-signing is activated in the form, only the following file types will be accepted : .pdf, .jpg, .jpeg, .png, .bmp, .gif. All uploaded files will be converted to PDF since it is required for the signing process.

Free text

Free text part 1

This question type generates an input field for the user.

You can set validation rules and connect available data sources in the settings.

Validation

Using validation will let you decide what kind of format the input field should have. Different kinds of validations are available, for example: 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.

For37

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.

For38

By checking “Always get the 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 the latest data”, the form will only fetch the data from the object once (the first time you open the form).

Checking “Save to the data source” will let you save the data from the form and update the field in the actual object. Note that the ‘save to the data source’ option is disabled on some data sources because those are not editable fields by users (for example, case name is editable but case number is not editable).

Note

Sweet data source functionality can be used only with the Free Text question type and Date and Time question type .

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.

In this field, you can also write HTML and inline-CSS, allowing you to create designed content instead of only plain text.

For39

List

The list question type will create a row with one or more sub-questions. Note that the List question as an independent question does not work. It always needs to have at least one sub-question. 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 below.

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

For40

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 it when the signing is done. This will lock all the forms’ answers 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.

Visibility rules on the Single/Multiple answer question (also Matrix)

  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.

Slide35-1

Slide35-2

You can also negate the rule that you just added. This means that the opposite will be true – the part will only show if Answer 2 is not chosen.

You can do this by hovering over 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

Visibility rules on the free text question

The user can add visibility rules to question-type free text. In this scenario, there is the pop-up where the user can

  1. leave the field empty - any answer will trigger visibility rules
  2. add the exact answer which has to be given to trigger the visibility rules

For42

Note

In the case of other question types than Single/Multiple and Free Text questions - the user cannot choose the exact answer in the pop-up. This means that the visibility rule will only depend on whether the question has any kind of answer or was left empty.

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 the 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 also be saved to the object.

For20

External data

The external data functionality allows you 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. External Data functionality is not visible in the Form Designer preview.

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

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 there is 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 can 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

It is recommended to use the validation on the search field connected to the external function in order to guarantee the correct search input.

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, using the “Validate when leaving the field” can be good practice so that the search won’t trigger as soon as the user types a character in the input field.

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, go to ‘publish settings’ by clicking the button at the bottom or Settings > Publish settings.

For31

  1. Checkbox to publish the form
  2. Publish the start and end date (optional)
  3. This functionality prevents the user from opening the specific answer set when the corresponding form version is unpublished. (Form has version 1 and the corresponding answer set version 1. If Version 1 of the form is unpublished, the user cannot access answer set version 1 even though version 2 of the form is published)
  4. This functionality allows the user to open the specific answer set only once when accessing the form with the direct link (for specific security reasons).
  5. This functionality prevents the user from opening the specific answer set after it is finished.
  6. This functionality prevents the user from opening the specific answer set after the expired decided validity period.
  7. A list of objects in Sweet that you can publish the form on

For33



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

For35

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

Form links

  1. Displays the ID of the form
  2. URL to the latest published version of the Form - the URL generated by this link will always create a new answerSet. Click the link in Form Designer, copy the URL from the browser and paste it into another browser and a new answerSet is opened.
  3. URL to the latest published version of the Form - the URL generated by this link will always open the same asnwerSet. Click the link in Form Designer, copy the URL from the browser and paste it into another browser and the same answerset is opened.

For36

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 create a new version and unlock 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