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.

‏١٠ أكتوبر‏‏٣:٤٢ م‏111
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": {
              }
            }
          }
        ]
      }
    }
  ]
}
‏١٠ أكتوبر‏‏٥:٥٢ م‏111
الإجابة المحددة
1

This is working now.

Thanks

‏١١ أكتوبر‏‏١:٢٢ م‏111
Pablo