Is it possible to adjust the number of columns in a checkbox grid based on previous answers?

1

I am using merge codes to bring in textbox answers from a previous question as the headers for a checkbox grid. If the respondent left a textbox blank then the column has no header. Is it possible to “hide” columns without headers? (e.g., if I have three text boxes and you only fill in two of the text boxes the table would display two columns with your responses as headers instead of 3 columns.)

phillipsresearch387271 asked
    1

    Hi,

    So I needed to adjust columns, which unfortunately don’t have the same logic options as rows but I was able to make this work. 

    I created a hidden question and used merge codes to pull in the text from the text boxes. I then set the logic for each response item in the checklist to display if the text box answer matched the regex pattern “.+” (one or more characters). This prevented empty text boxes from displaying in the checklist. I set all checkboxes to selected by default and piped the responses from the checkbox lists into the table.

    Nikolay Ryazantsev commented
      • I met the same problem as you (need to adjust the number of columns in the grid) but can’t catch your idea. Columns do not have any adjustments at all. Could you clarify how did you manage it?

      • I finally was able to figure it out. Even though many questions’ options in SG do not support logic, they support piping. The idea is to create one more special simple checkbox-type question that will be a source for a piping. So, all manipulations are happening in that special question, and then “answers” pipe into target question.
        I personally did not use logic in that “special” question but used custom script to populate it. I found it even easier. Furthermore, in such case it doesn’t require separate page that have to be passed thorough to make the logic work.

      1

      Hi,

      You should be able to do this by editing the rows of your checkbox grid and putting logic on each of the rows. I think you could use the “is answered” operator to say, “only show [show 2] if [textbox 2] is answered”. By doing it that way, the row will only show if there was text entered into the textbox.

      Robert

      Robert Hamlsey answered
        ×

        Login

        Question stats

        • Active
        • Views3137 times
        • Answers2 answers
        • Followers0 followers