1 Reply Latest reply on Oct 24, 2012 1:23 AM by try67

    Automatically selecting a radio button depending on response

    bjmccoy

      I want to make a script that basically says

       

      if "qty" value is >60 then the "greater" value of a radio button is true

       

      but I'm not exactly sure how to put that into a script or if I should put the script on the radio button or the text field where they put the number.  Can someone please help?

       

      Thank you!

        • 1. Re: Automatically selecting a radio button depending on response
          try67 MVP & Adobe Community Professional

          So let's say you have two radio-buttons in a group called "Group1", and one has the value "Greater" and the other "Smaller".

          You can place this code as the text field's custom validation script to have one of them selected based on the field's value:

           

          if (event.value=="") this.getField("Group1").value = "Off";

          else this.getField("Group1").value = (+event.value>50) ? "Greater" : "Smaller"

           

          In the case above, the threshold is 50. You can of course change it to whatever value you want.