show when condition

Certified Associate Developer

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 ?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hello ,

    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? 

Reply
  • 0
    Certified Senior Developer

    Hello ,

    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? 

Children
No Data