Question T10890
Visible to All Users

How to preset a question based on another question input

created 2 years ago (modified 2 years ago)

[Ticket cloned from T10819: Analyze the form in multiple time periods]

Hi Team,
Please help here.

Example Q1= single Text:1______ questions and Q10= Multiple text (Text1:____ and Text2:____).
If I entered Text1= 10 at Q1, the i need to punch Q10.Text1:= 10, How can i do it, please let me know.

Answers approved by surveyjs Support

created 2 years ago

Hello Ramu,
You can specify the defaultValueExpression for your Q1. For example, the following expression sets the value of Q1 to the value of Q2's first item:

JSON
{ "pages": [ { "name": "page1", "elements": [ { "type": "text", "name": "question1", "defaultValueExpression": "{question2.text1}" }, { "type": "multipletext", "name": "question2", "items": [ { "name": "text1" }, { "name": "text2" } ] } ] } ] }

Example.
Clipboard-File-1.png

Also, you can configure the Copy/Set Value trigger and copy another question's value on a condition:

For more information and examples, refer to:

Please let me know if you have any questions or require further assistance.