Teamraiser Questions - Can they be conditional?

Options

Does anyone know how to make the questions you ask when you sign up a participant conditional?  For example, I want it to appear is if we have only 3 questions to ask:

Are you a member? Yes/No

Are you Native American? Yes/No

How did you hear about this event?  Drop down list

For the first 2 questions, if they answer yes, I would like to have text fields open or appear so that they can enter in their member number and tribal affiliation.

Has anyone tried this before?

Inger de Montecinos

National Museum of the American Indian

Tagged:

Comments

  • The only way to do this would be to use Javascript to bind an onchange event to the two Yes/No dropdowns that shows/hides the text field dependent on the user's response. Using the Utils.js library included on your Convio site, this would look something like:

    <script type="text/javascript">

    addOnLoadHandler(function(){

        showHideQuestion();

        var yesNoQuestion=document.getElementById('1743_2540_1_2740');

        Utils.addEvent(yesNoQuestion,'change',showHideQuestion);

    });

    function showHideQuestion(){

        var allTableRows=document.getElementsByTagName('tr');

        var yesNoQuestion=document.getElementById('1743_2540_1_2740').value;

        if(yesNoQuestion=='Yes'){

            allTableRows.style.display='';   

        }

        else{

            allTableRows.style.display='none';

        }

    }

    </script>

    Where 1743_2540_1_2740 is the Yes/No question to check, and 28 is the position of the table row containing the question to show or hide in the array of all table rows on the page.

Categories