Complex Grid: Radio Row - Mobile Smart / Buttonized
This article will help you create a Complex Grid with buttons as the clickable buttons
Background
You may want a more user friendly way to display a Radio Row Grid. This article will show you how to convert the radio buttons and text into buttons.
Complex Grid: Radio Row - Mobile Smart / Buttonized
NOTE: This ONLY supports Radio Row formatting
- Add a 'Complex Grid' question to your survey
- Add your question text as needed.
- Click on the Header Row cell ('H') to select the entire row
- Click on the ellipses icon and click on the 'Remove headers to this row' button
- Type and/or paste in your response level attributes
- Type and/or paste in your button text. You can paste in one row at a time but you will not be able to paste in the entire grid.
- Create your Radio Row sub-question within the Complex Grid. To do this:
- Highlight the cells that will contain the buttons
- Click on the 'Add Question' icon
- Click on the 'Radio items' button
- You will be asked, "Do you want to reuse existing content?". Select 'Yes' in order to keep the text in those cells.
- You will be asked, "Where do you want to place the current content?". Select 'To the left'.
- You will be asked, "Do you want to set these by row or by column?". Select 'By row'.
- The grid will now look like this:
- Highlight the cells that will contain the buttons
- Go into the Overall Question Settings
- See article: Overall Question Settings
- Turn on the 'Mobile Smart' toggle. This is what converts the radio and cell text to buttons
- Add the following to the 'ADD JAVASCRIPT' section of your question
- Update your question number in the code below. This will go back to the top of the screen if you are on a mobile device
/* MOBILE SMART - GO TO TOP OF SCREEN WHEN NEXT BUTTON SELECTED TO SEE NEXT ATTRIBUTE */ jQuery("#cm-NextButton").attr("href","#question-Q100"); /* <-- update your question number here */
- OPTIONAL: If you would like each row to show up one at a time when on desktop devices, add the following code to the JavaScript as well.
/* DISPLAY ONE ROW AT A TIME. SHOW NEXT ROW ONCE CURRENT ONE IS ANSWERED */ jQuery("tr.cm-grid-row").each(function () { jQuery(this).find(".cm-grid-cell-radio-question").parents("td").click(function () { jQuery(this).parents("tr").next().show(); }) })
- Update your question number in the code below. This will go back to the top of the screen if you are on a mobile device
- As always, make sure to test and confirm everything looks the way you intend