Set value of text field based on radio button selection

I have a radio button with 2 options, {"Yes","No"}, if the user selects "Yes" I want to systematically update the value of a text field to "Yes was selected", if the user selects "No" then I want to set the value of the text filed to "No was selected".

I have rule input values for both the radio button and the text field. How do i set the value of the text field based on the radio button selection

OriginalPostID-220667

OriginalPostID-220667

  Discussion posts and replies are publicly visible

Parents
  • @pieterk, In the SaveInto parameter of the Radio button, you need to use a a!save() to save the appropriate value to the rule input to be used in the value parameter of the Text field. Your SaveInto parameter of the radio button will look like one of the followings -

    saveInto:{
    ri!radioButtonValue,
    a!save(ri!textFieldValue,if(ri!radioButtonValue="Yes","Yes Was Selected","No Was Selected")
    }
    or
    saveInto:{
    ri!radioButtonValue,
    a!save(ri!textFieldValue,save!value&" was Selected")
    }
Reply
  • @pieterk, In the SaveInto parameter of the Radio button, you need to use a a!save() to save the appropriate value to the rule input to be used in the value parameter of the Text field. Your SaveInto parameter of the radio button will look like one of the followings -

    saveInto:{
    ri!radioButtonValue,
    a!save(ri!textFieldValue,if(ri!radioButtonValue="Yes","Yes Was Selected","No Was Selected")
    }
    or
    saveInto:{
    ri!radioButtonValue,
    a!save(ri!textFieldValue,save!value&" was Selected")
    }
Children
No Data