How to hide text input using radio button?

Hi everyone,

                 Can anyone help me out with this scenario:When clicking on the radio button i need to hide the below text input?

  Discussion posts and replies are publicly visible

Parents
  • store the selection in rule input and use same variable as a parameter for showWhen in textField... use whole sail code in with(). refer below code,
    contents: {
    a!radioButtonField(
    label: "Test",
    choiceLabels: {
    "Yes",
    "No"
    },
    choiceValues: {
    true(),
    false()
    },
    value: ri!flag,
    saveInto: ri!flag
    ),
    a!textField(
    label: "Lorem Ipsum",
    labelPosition: "ABOVE",
    showWhen: ri!flag
    )
    }

    Hope this will help you.
Reply
  • store the selection in rule input and use same variable as a parameter for showWhen in textField... use whole sail code in with(). refer below code,
    contents: {
    a!radioButtonField(
    label: "Test",
    choiceLabels: {
    "Yes",
    "No"
    },
    choiceValues: {
    true(),
    false()
    },
    value: ri!flag,
    saveInto: ri!flag
    ),
    a!textField(
    label: "Lorem Ipsum",
    labelPosition: "ABOVE",
    showWhen: ri!flag
    )
    }

    Hope this will help you.
Children
No Data