Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Moving the input cell to the right in a Constant Sum question

Hi! I'm trying to swap the option cell and the input cell in a Constant Sum question. I tried using the following code found in another question, but it didn't seem to have any impact.
    $('#[% QuestionName() %]_div .response_row').each(function(){
        var maxWidth = 0;
        $('#[% QuestionName() %]_div .option_cell').each(function(){
            var thisWidth = $(this).width();
            if (thisWidth > maxWidth) {
                maxWidth = thisWidth;
        $('#[% QuestionName() %]_div .option_cell').width(maxWidth);

Any insight into why it's not working/how to get the input cells on the right side of the page would be appreciated! Thanks!
asked Mar 18, 2020 by KKing (300 points)

2 Answers

0 votes
Not sure about switching it on a Constant Sum type question, but what I've typically done instead is set it up using a grid style question, column based, and set it as a constant sum.  This way you can get the look you are desiring.
answered Mar 19, 2020 by Jay Rutherford Gold (42,810 points)
0 votes
Constant sums use tables instead of the divs of some other question types, so you'll want to use this:

$('#[% QuestionName() %]_div .input_cell').each(function(){

instead of this:

$('#[% QuestionName() %]_div .response_row').each(function(){
answered Mar 19, 2020 by Zachary Platinum Sawtooth Software, Inc. (173,575 points)