-
Templates
-
Simple Questions
-
Text Entry
-
Date-Time Entry
-
Numeric Entry
-
Color Input
-
Radio Button Group
-
Drop-Down Menu
-
Dropdown: Load Data from Web Services
-
Dropdown with Lazy Loading
-
Multi-Select Dropdown
-
Checkboxes
-
Carry Forward Responses
-
Image Picker
-
Yes/No Question
-
Signature Pad
-
Multiple Text Box
-
Rating
-
Ranking
-
Text Area / Comment
-
Image
-
Html
-
File
-
Expression
-
Expression (using async functions)
-
-
Matrix Table Questions
-
Panel & Dynamic Panel
-
Survey
-
Title and Logo
-
Questions in one line
-
Survey Options
-
Auto-Populate Form Fields
-
Piped Text
-
Edit saved survey
-
Read-only/display mode
-
Show Preview before complete
-
Pop-Up Survey
-
Context actions in element titles
-
Modify title tags
-
Custom render of survey elements
-
File - custom preview
-
File - delayed upload
-
Lazy questions rendering
-
-
Quizzes and Scored Surveys
-
Customize Rendering
-
Integration with Third-Party Libraries
-
Appearance customization
-
Navigation
-
Conditions and Triggers
-
Change Question Visibility
-
Simplify Cascade Conditions
-
Complex Questions in Expressions
-
Custom Functions in Expressions
-
Implement a Custom Expression Property
-
Dynamic Questions with Conditional Logic
-
Hide Question Elements (Rows, Columns, Choices)
-
Show/Hide individual items in radiogroup/checkbox/dropdown
-
Hide Rows and Columns in a Matrix Table
-
Hide Rows and Columns in a Matrix Dropdown Question
-
Conditional Logic to Enable or Disable Questions
-
Complete Trigger
-
CopyValue Trigger
-
SetValue Trigger
-
Run Expression Trigger
-
-
Text Formatting
-
Survey Localization
-
Input Validation
-
SurveyJS Storage
Piped Text
Text piping allows you to dynamically insert text into questions and answers based on previous answers. Piped text can be used to personalize a survey (for example, you can address a respondent by their name) or simply to avoid re-entering already known information. In follow-up questions, piped text can be used to ask a respondent to indicate reasons behind their answer or elaborate on a brief response with further comments or details. For instance, if respondents should fill out an employment history form, you can ask them to list their previous and current employers briefly, and then you can use piped text to generate detail forms for each employer.
Implement Text Piping
To implement text piping, assign the same value to the valueName
property of questions that should share data. In this demo, the employment history form contains two questions of the Dynamic Matrix and Dynamic Panel types. Respondents enter a list of employer names into the matrix and details about each employer into multiple panels. Together, Dynamic Matrix and Dynamic Panel produce an employees
array of objects. The matrix supplies the employee-name
field values; the panel supplies the remaining field values. Once associated via valueName
, two questions can reference each other's values. For example, values from the matrix can be displayed in panel headers, as shown in this demo.
Pipe Text Between Incompatible Question Types
Dynamic Matrix and Dynamic Panel are compatible because they both produce arrays of objects when they are used as standalone questions. In some instances, you need to pipe text between questions that produce results in different formats and as such are incompatible. For example, the Checkbox question type produces an array of primitive values, and a primitive value cannot be merged with an object. To force a Checkbox question to produce an array of objects, specify the valuePropertyName
property with a field name that should store question values. This field name can be used to pipe the question values to other associated questions.
In this demo, the second survey page asks respondents to tell about their language skills. Respondents should select languages they speak from a Checkbox question. For each selected language, a Dynamic Panel question generates a detail panel. The two questions are associated via valueName
and the Checkbox question produces an array of objects. The language
object field stores the selected language. This field is used to reference languages in panel headers.
-
Templates
-
Simple Questions
-
Text Entry
-
Date-Time Entry
-
Numeric Entry
-
Color Input
-
Radio Button Group
-
Drop-Down Menu
-
Dropdown: Load Data from Web Services
-
Dropdown with Lazy Loading
-
Multi-Select Dropdown
-
Checkboxes
-
Carry Forward Responses
-
Image Picker
-
Yes/No Question
-
Signature Pad
-
Multiple Text Box
-
Rating
-
Ranking
-
Text Area / Comment
-
Image
-
Html
-
File
-
Expression
-
Expression (using async functions)
-
-
Matrix Table Questions
-
Panel & Dynamic Panel
-
Survey
-
Title and Logo
-
Questions in one line
-
Survey Options
-
Auto-Populate Form Fields
-
Piped Text
-
Edit saved survey
-
Read-only/display mode
-
Show Preview before complete
-
Pop-Up Survey
-
Context actions in element titles
-
Modify title tags
-
Custom render of survey elements
-
File - custom preview
-
File - delayed upload
-
Lazy questions rendering
-
-
Quizzes and Scored Surveys
-
Customize Rendering
-
Integration with Third-Party Libraries
-
Appearance customization
-
Navigation
-
Conditions and Triggers
-
Change Question Visibility
-
Simplify Cascade Conditions
-
Complex Questions in Expressions
-
Custom Functions in Expressions
-
Implement a Custom Expression Property
-
Dynamic Questions with Conditional Logic
-
Hide Question Elements (Rows, Columns, Choices)
-
Show/Hide individual items in radiogroup/checkbox/dropdown
-
Hide Rows and Columns in a Matrix Table
-
Hide Rows and Columns in a Matrix Dropdown Question
-
Conditional Logic to Enable or Disable Questions
-
Complete Trigger
-
CopyValue Trigger
-
SetValue Trigger
-
Run Expression Trigger
-
-
Text Formatting
-
Survey Localization
-
Input Validation
-
SurveyJS Storage