R
R
ragnar_ok2019-07-01 22:31:50
JSON
ragnar_ok, 2019-07-01 22:31:50

How to understand condition in JSON property value?

I created JSON using Survey Creator :

{
     "pages": [
      {
       "name": "page1",
       "elements": [
        {
         "type": "radiogroup",
         "name": "question1",
         "choices": [
          "item1",
          "item2",
          "item3"
         ]
        },
        {
         "type": "text",
         "name": "question2",
         "visibleIf": "{question1} = \"item1\""
        }
      }
     ]
    }

Depending on the value of the visibleIf property, question2 should be hidden or shown .
What does {question1} = \"item1\" mean in the visibleIf property value . How will it work? That is, I understand if it looked like this:
"visibleIf": { "name":"question1", "value":"item1" }
But I don't understand the option above.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question