Fun way to get 100% with 2 options?

0

We would like to build a question that has a way to answer 2 questions in one.

For example, we are asking them percentage built in-house vs. percentage built outside which needs to add up to 100%.

However, instead of having them fill out 40% and 60%, is there a way they can just fill in the 40% and the 60% is automatic? The thoughts we had were: a) a pie chart option where they can move the slice, b) a slider bar where it has the two percentages showing or color coordinated, or c) an autofill (boring but sufficient) that autocalculates the second percent (100-x). 

cadecarnahan answered
    0

    If you have the ability to use custom script actions on your survey, you could use a relatively simple PHP command here:

    %%number = sgapiGetValue(3);

    %%total = (100 – %%number);

    if (%%total == 0) {

    %%total = “0”;

    }

    sgapiSetValue(4,%%total);

     

    You would want to change the “3” in the first line to match the QID of the question for in house and then change the “4” in the last line to match the QID of the question you’d like to automatically populate with the answer. You’d also probably want to hide that question by default from the “Logic” tab of the question.

     

    Essentially, what this is going to do is take their input for the first question and subtract it from 100 to get the second percentage. Placing it in a question or a hidden value if you wish. This will also allow you to use logic based on that number and reference it later.

    cadecarnahan edited answer
      0

      Why not a slider, left label “built-in”, right label “outside”, with 10% steps?

      strasser90 answered
        0

        Thanks Dominic! 

        Karen Rot answered
          0

          There is not currently a built-in feature to do the dynamic percentage adjustment that you are looking for. Having said that, it would definitely be possible – it would just require a custom solution.

          SurveyGizmo allows you to add your own custom JavaScript to surveys to expand on SurveyGizmo’s native features (provided that your account has access to the feature):

          https://help.surveygizmo.com/help/adding-javascript-to-your-survey

          I, unfortunately, do not have a script example that I could share.

          If this is something that you want to pursue but don’t have development resources at your disposal, SurveyGizmo has a Programming Services team that can build custom solutions for things like this:

          https://www.surveygizmo.com/programming-services/

          Hope this gives you some options!

          Dominic Sharpe answered
            ×

            Login

            Question stats

            • Active
            • Views5399 times
            • Answers4 answers
            • Followers1 follower