Skip to main content
Participating Frequently
January 19, 2023
Question

show when condition

my condition is like,

when click on radio button it goes to next activity and radio button must be disappeared

so i want to do only disappeared radio button when going to next

how can i do that ?

    1 reply

    konduruc733182
    Inspiring
    January 19, 2023

    Hello lokeshp0003,

    Here is what you have asked for

    a!localVariables(
      local!radio,
      local!text,
      {
        a!radioButtonField(
          label: "Field 1",
          choiceLabels: { "Yes", "No" },
          choiceValues: { "Yes", "No" },
          value: local!radio,
          saveInto: local!radio,
          showWhen: if(
            a!isNullOrEmpty(local!radio),
            true(),
            false()
          )
        ),
        a!textField(
          label: "Field 2",
          value: local!text,
          saveInto: local!text,
          showWhen: a!isNotNullOrEmpty(local!radio)
        ),
        a!buttonLayout(
          primaryButtons: a!buttonWidget(
            label: "Clear",
            saveInto: {
              a!save(local!radio, null),
              a!save(local!text, null)
            }
          )
        )
      }
    )

    But why do you want it to disappear?