[Solved] Adding reporting values to Dropdown Menu Grid – Dropdown Menu Items

0

Is there any way to add reporting values to the Dropdown Menu Items in a Dropdown Menu Grid question?

 

For example, if I’d like all “Low” values to export as ‘0’.

 

Paul Matsui asked

    Best answer

    0

    Hi Ian,

    I figured it out for you!

    Perform the following:

    1. Set a custom class to the question, in this example I set it as ‘menuGrid’.
    2. Add the following javascript before your question –

    $(document).ready(function(){
    var myElement = $(‘.menuGrid select’);
    myElement.find(‘option:eq(1)’).val(‘3’);  // this is assuming that your
    myElement.find(‘option:eq(2)’).val(‘2’);  // only options are High, Medium
    myElement.find(‘option:eq(3)’).val(‘1’);  // and Low.
    });

    The eq(%%this) is equivalent to the 1st, 2nd and 3rd option in the list. (The (0) option is the Please Select)

    The val(‘%%this‘) is the new value that is applied to the option.

    I have not done any testing to see how this transfers over in reporting but it does get the value to change in the Radio Button Grid.

     

    Jacob Hayslett answered
      1

      Hi Paul,

      Click the link on the bottom left that says Advanced Option Settings and set the Reporting Values to Custom.

      Jacob Hayslett answered
        0

        Hey Jacob,

        I only want to set the reporting values for the actual drop-down list values.  

        Take the original screenshot for example- I have a drop-down with 4 options (“High”, “Medium”, “Low”, “N/A”).  When the survey loads, this creates an HTML <select> element with four options.

        I want:
        <option value=”High“>High</option>

        To look like:

        <option value=”3“>High</option>

         

        Is there any way to configure the dropdown items to have a reporting value?  On paper this seems like it should be configurable without doing custom JavaScript that is liable to break on the next upgrade.

         

        Paul Matsui answered
          0

          Hey Ian,

          Sorry I saw that I posted a picture with a Radio Button Grid rather than a Dropdown Menu List, they both work the same though.

          Are you looking to have different answers based off the row?

          If you are looking for that I would think you would need to set a custom value with javascript.

          Jacob Hayslett answered
            0

            Thanks Jacob, but what I would like to do is set the reporting values for the Dropdown Menu Items within each cell in the grid.  Any chance there is a backdoor way of doing this (so that the user sees text in the dropdowns, but it is stored/reported as a numeric value)?

             

            Thanks,

            -Ian

            Paul Matsui answered
              ×

              Login

              Question stats

              • Active
              • Views4211 times
              • Answers5 answers
              • Followers0 followers