How do I create a condition that automatically selects an dropdown option in another drop down box?

  • Profile Image
    Asked on June 01, 2012 at 10:21 AM

    I am trying to set up a condition using drop down boxes. I would like to create a condition that can automatically select a drop down box option. I know you can show or hide forms but is there an option to select options in the form.

  • Profile Image
    Answered on June 01, 2012 at 01:27 PM

    Unfortunately, this is not possible to accomplish through our conditons wizard

    However, a workaround could be to create the boxes and with some javascript code have them pre-selected ,  and show them when a dropdown option has been selected.

    However, in order to accomplish the pre-selection, once you finish adding the show/hide conditions to the form ,you would have to download the source of your form, and follow in some way the insructions my colleague Abajan has posted on this thread.

    Even though these instructions were done for a check box into a payment tool, they ilustrate an example for you.

    So for example: the function  document.getElementById("input_6_1001").checked=true;

    Where input_6_1001  is the element of the form on that example, can be replaced by your form's element id (your dropdown menu) 

    This is the complete sintax for the script

    <script type="text/javascript">document.getElementById("input_6_1001").checked=true;</script>

    Best regards



  • Profile Image
    Answered on August 31, 2012 at 01:55 AM

    on condition()

    document.getElementByID( ).childNode.selectedIndex=document.getElementByID(whose value is to assigned) ).childNode.selectedIndex