5 Replies Latest reply: May 7, 2015 4:47 AM by Radhika Magaji RSS

    How do I change an objects value type depending on a Y/N Radio button?

    dperani70 Community Member

      I have the following code behind some Radio Buttons:

       

      Form1645.Page3.TeeCrossSubform.TeeCross::exit - (JavaScript, client)

      if Page3.TeeCrossSubform.TeeCross.rawValue = "N" {

          xfa.Page3.TeeCrossSubform.Disruptfield.access = "open";

          xfa.Page3.TeeCrossSubform.TeeCrossCC.access = "protected";

          }

      else {

          xfa.Page3.TeeCrossSubform.Disruptfield.access = "protected";

          xfa.Page3.TeeCrossSubform.TeeCrossCC.access = "open";

          }

       

      NOTE: I based this code on the following information (which may be wrong but I found nothing else on the subject): http://forms.stefcameron.com/2010/03/08/disabling-all-fields-within-subform/

       

      No matter which radio button is selected (Y or N) the fields are all "open" or "unprotected".

       

      Any help is greatly appreciated!