Question T4482
Visible to All Users

Survey creator: Significance of "value name" property

created 5 years ago

Hello team,

I couldn't understand "value name" property under data category. Why do we need it?

Answers approved by surveyjs Support

created 5 years ago

Hello,

The valueName property is set the name that will be used to store the question value. If it isn't set the question name is used as the value name. You can for example create two different questions with different names but with the same question value. In this case these two question will be modified synchronously.

You can read the documentation - https://surveyjs.io/Documentation/Library?id=Question#valueName

Thanks, Serge
SurveyJS Team

    Comments (2)

      can we create a form variable with expression equal to some question and have same value for both as an alternative to this?

        You can have an expression equal to a question: {questionValueName}. However, the main goal of this function is to share data between several questions.
        Here is the example.

        Thank you,
        Andrew
        SurveyJS Team