Logga

Script in Question form

Script fields allow you to create an input field by using a script. This may be desirable if you want a different look to an existing question, or if you need to use a field type that is not available by default.

Exempel på skriptfält

Exempel på skriptfält

This requires scripting knowledge.

Click on the Add field link to add a field (a question). Select the field type you want to add. You will get different settings depending on the field type you select.

General tab - Field type Script

Select field type: Script in the list.

Script

Sub-questions

Here you add a sub-question by clicking the Add sub-question link. A new view appears where you can add information:

Add sub script

Name

Fill in names that you can refer to when writing custom JavaScript or velocity later on.

Description

Enter a description of the sub question.

Make field mandatory

Tick this if this field is to be mandatory.

Category

Can be text, hidden, or password.

Validation error message

Fill this in if you want to enter custom error message.

Input field rendering

Javascript

Click JavaScript and a field drops down where you can write in JavaScript.

Javascript

Velocity

Click Velocity and a field drops down where you can write in velocity. 

Do not use default rendering for the form

Tick this box if you do not want to use the form's default rendering.

Validation of values

Use own JavaScript when validating values

Tick this box to use custom JavaScript when validating. A field with JavaScript then appears. If you click on it, a field will drop down where you can enter custom script for validation.

Value rendering (HTML)

Use scripts when rendering values

Tick this box if you want to use custom javascript or velocity when rendering values. JavaScript and/or velocity fields are then displayed. If you click on velocity, for example, a field will drop down where you can enter custom script for validation.

Value rendering (Email)

Use scripts when rendering values

Tick this box if you want to use custom javascript or velocity when rendering values. JavaScript and/or velocity fields are then displayed. If you click on velocity, for example, a field will drop down where you can enter custom script for validation.

Help with scripts is not included in the support agreement.

The page published: 2019-01-15

Find us!

SiteVision AB (Headquarter)
Vasagatan 10
702 10 Orebro
Sweden


Info: +46 19-17 30 30
Support: +46 19-17 30 39