2 Replies Latest reply on Aug 11, 2012 3:33 PM by Zizazat

    Using a dropdown to set a radio button

    Zizazat

      I've been searching and searching in vain, trying many different things can I cannot seem to find an answer already or stumble on similar code to help.

       

      I've got a dropdown, then when you select different values set different fields on the form. That part works fine stuff like this in the custom validate:

       

      if (event.value == "Thing1") {

        this.getField("DESC01").value = "Words that fill in a desciption box.";

        this.getField("DESC02").value = "More words that fill in another descrption box";

        this.getField("F_SKILL1").value = "1";

        this.getField("RB_SKILL1").isBoxChecked(1);

        this.getField("F_SKILL2").value = "1";

        this.getField("F_SKILL3").value = "1";

      } else if (event.value == "Thing2") {

        this.getField("DESC01").value = "Different words that fill in a desciption box.";

        this.getField("DESC02").value = "More different words that fill in another descrption box";

        this.getField("F_SKILL4").value = "1";

        this.getField("RB_SKILL1").isBoxChecked(0);

        this.getField("F_SKILL5").value = "1";

        this.getField("F_SKILL6").value = "1";

      }

       

      etc, etc. I've got a few different else ifs but they all follow this kind of format. There is are also radio button next to the skills on the sheet to visually display that skill is known. So I'd like to turn that radio button on. My isBoxChecked isn't working, and I expect that's because it doesn't work that way. I have a lot of radio buttons on the form, but they all have 1 choice in them none are groups. Again, I'm using this as a visual display that SKILLX is known. The area I've dropped the radio button onto the sheet is a very small circle which is why I am trying to use a radio button as it's visually similar.

       

      If there is a better solution to what I'm trying to do I'm happy to try that, or if someone can tell me what I'm doing wrong that'd be super

       

      Thanks!

        • 1. Re: Using a dropdown to set a radio button
          MarkWalsh Level 4

          Set the checkbox to it's Export Value for it to be checked, or to 'Off' to uncheck

           

          this.getField("RB_SKILL1").value = 'Yes'

          this.getField("RB_SKILL1").value = 'Off'

          • 2. Re: Using a dropdown to set a radio button
            Zizazat Level 1

            Not quite sure I'm getting what you are laying down...

             

            So in the dropbox, under options I should set the export value of Thing1 choice to RB_SKILL1 and then in my validate I should include this.getField("RB_SKILL1").value = 'Yes' ?

             

            Or I should just set the export value of Thing1 to this.getField?

             

            Thanks

             

            Oh, using a check box I was able to get this working using the export values set for Thing1 option, most excellent! Thank you very much!