init-value of Inputs Hidden by IF no longer populate
2

As of today if a TextInput is hidden by an IF condition the init-value no longer populates once the IF condition evaluates to True and exposes the TextInput.

This was working yesterday.

Chris
已發問 星期四
Chris

This is specific to flows.

10月10日下午3:42
Pablo

Here is an example of the initial values not being populated inside an if. Select Option 1 first and the Option 2 and fields will appear but empty.

{
"version": "5.0",
  "screens": [
    {
      "id": "FIRST_SCREEN",
      "title": "Example",
      "terminal": true,
      "data": {
        "theDate": {
          "type": "string",
          "__example__": "2024-08-01"
        }
      },
      "layout": {
        "type": "SingleColumnLayout",
        "children": [
          {
            "type": "RadioButtonsGroup",
            "label": "Options",
            "required": true,
            "visible": true,
            "name": "optionsRadioGroup",
            "data-source": [
              {
                "id": "opt1",
                "title": "Option 1"
              },
              {
                "id": "opt2",
                "title": "Option2"
              }
            ],
            "init-value": "opt1"
          },

              {
                "type": "RadioButtonsGroup",
                "name": "optionsRadioGroup2",
                "label": "Sub Options",
                "visible": true,
                "required": true,
                "init-value": "opt1",
                "data-source": [
                  {
                    "id": "opt1",
                    "title": "Option 1"
                  },
                  {
                    "id": "opt2",
                    "title": "Option2"
                  }
                ]
              },
              {
                "type": "If",
                "condition": "${form.optionsRadioGroup2} == 'opt2'",
                "then": [
                  {
                    "type": "TextInput",
                    "required": true,
                    "label": "Amount",
                    "input-type": "number",
                    "name": "amount",
                    "init-value": "10"
                  },
                  {
                    "type": "DatePicker",
                    "name": "theDate",
                    "required": true,
                    "label": "Date",
                    "min-date": "${data.theDate}",
                    "init-value": "${data.theDate}"
                  }
                ]
              },
          {
            "type": "Footer",
            "label": "Submit",
            "on-click-action": {
              "name": "complete",
              "payload": {
              }
            }
          }
        ]
      }
    }
  ]
}
10月10日下午5:52
已選擇的回答
1

This is working now.

Thanks

10月11日下午1:22
Pablo