Question Properties

The Survey, each Survey Page and each Question have modifiable properties allowing the creator to be very specific in the design. The properties can be updated anytime during the creation process.

Because there are many toolbox controls with individual properties, this guide will look at the most common properties among the controls. For further examination of the various properties, consult the Survey JS website (http://surveyjs.io).

General Properties

Enter the Name/Title/Description of the question. The name and the title can be different. If you enter both the name and the title, the question title will take precedence on the form, but if you use any of the logic properties you must reference the question name.

Decide if the question is visible, required or read only.

Input Type

 

The default is text, but if you want the data in the question to be specifically formatted, enter an alternate input type. For example, if you want data to appear as money formatted, choose number in the Input Type property and later in the Input Mask property choose currency.

Layout

An important decision in placement is whether the question is at the start of a new line or not. The default is to start a new line.

If the question is supposed to follow another question on the same line, then uncheck the check box. The question will be pushed up a line and placed to the right of the question on the same line.

Under Survey properties, you can turn off question numbering for the entire form. If you did not and you do not want the question number to show, check the Hide Number check box.

The State property determines how the question will appear on the form. The choices are default, collapsed, and expanded. Default simply shows the question. Collapsed hides the input area and has a small up/down arrow on the far right side of the screen. For collapsed, clicking the arrow will show the input. area. For expanded, the input area is shown with a down arrow to hide the input area.

Next you can set the Title and Description locations.

Indent refers the amount of space you want the input to start relative to the left margin of the question. 0 means no indent.

The width of the question is important as it relates to the locations of the other questions on the same line.

When more than one question is on the same line, the width of each question on that line should be relative to each other and the balance of the space on that line. Make the width values so that the questions line up together and presents a professional and pleasing look and feel.

Logic

Just like prior property pages, the Logic section allows for conditional events between the questions.

Let's assume, the survey collects Medicare numbers for respondents over 65. The Medicare number question is hidden because it is not needed for respondents under 65.

In the graphic above, we are setting the condition to show the Medicare question if question1 equals a specific value. The choices 1-5 could represent age ranges where one of the ranges is “65 or over”. If that data range is picked, the condition is met and the Medicare question appears on the form.

The same conditions from the Visible If property are true for the Enable If and Required If properties.

Also, a default value for a question can depend on a true or false condition.

Data

The Value Name property is used to send data from one or more prior fields into another field. Place the name of the source field or an expression if multiple fields are involved.

Let’s assume question1 has an answer we want to populate Question11. In the Value Name property for question11 enter the name of question1. {question1} Squiggly brackets are required around field names.

Another example might be two different number fields needed to be added and placed into a total field.

In the Value Name field for the destination field enter the numeric expression to sum the fields.

{question1} + {question2}

Another way to procure the same result is to write an expression in the logic property section. Under the default value, enter the following expression.

Sum({question1}, {question2})

Validation

 

The validation property is used to control the data entered into a question. If the question is supposed to contain numeric values and instead characters are incorrectly entered, the validation property will catch the error and place an error message on the screen.

Enter the required error text message to be shown when an error is detected.

You can use any of the listed validators to catch data errors.

 

Specific Properties for specific controls

Choices

The Choices property is the way to name the choices in a dropdown list, radiogroup or checkbox controls.

The choices can be hardcoded to the question as shown above, pulled down from a database, selected from the web or from other questions on the survey.

The number of choices can be increased or decreased as needed.

Rating Values

A rating question defaults to 5 choices numbered 1-5. You can add or subtract the number of choices as well as change the numeric values of the choices.

 

CASO Knowledge Base