When randomizing answer options customers often wish to keep specific answer options together. While we don't have a built-in feature for this you achieve this with Radio Button and Checkbox questions with some JavaScript.
Check it out in an example survey!
OR
Download this example survey to your account!
Setup
To get started, create your list of answer options and set them to be randomized. Next, on the same page, add a JavaScript Action and paste the below code. Change the highlighted text of the script to read exactly like your answer options (case sensitive).
$(document).ready(function(){ var firstOption = $("li:contains('Keep this together 1')"); var secondOption = $("li:contains('Keep this together 2')"); secondOption.detach(); firstOption.after(secondOption); });
Finally, test your survey to ensure that the options are being kept together!
Compatibility
This script is compatible with Radio Button and Checkbox questions.
Scripting and Other Custom Solutions
We’re always happy to help you debug any documented script that is used as is. That said, we do not have the resources to write scripts on demand or to debug a customized script.
If you have customization ideas that you haven't figured out how to tackle, we're happy to be a sounding board for SurveyGizmo features and functionality ideas that might meet your needs. Beyond this, check out our Professional Services; these folks have the scripting chops to help you to achieve what you are looking for!
Admin
— Mike Cordeiro on 04/16/2020
@Reem: Thanks for your question!
At this time this script is not compatible with the radio button grid question type. I will certainly pass along that there is interest in this to our team!
Thanks!
Mike
Technical Writer
SurveyGizmo Learning and Development
— Kennedy.clayton on 04/14/2020
Does this work for radio button grids yet, or is there another article/script to use?
Admin
— Dave Domagalski on 03/21/2019
@Honda: Thank you for your question!
I'm afraid that this scripting example is specific to keeping two answer options together.
At this time, we do not have a readily available version of this script for more than two options.
I'm sorry for the trouble!
David
Technical Writer
SurveyGizmo Customer Experience
— Honda@fuelcycle.com on 03/21/2019
What would be the JavaScript for keeping more than 2 options together?
Admin
— Bri Hillmer on 01/28/2019
@Nick: This script does not support Radio Button Grid questions with a list of answer options. I'll be sure to add this to the documentation to help other users like yourself!
Bri Hillmer
Documentation Coordinator
SurveyGizmo Customer Experience Team
— Nick on 01/26/2019
Should this work with a Radio Button Grid question as well?
Admin
— Dave Domagalski on 08/10/2018
@Rebecca: Thank you for exploring SurveyGizmo documentation!
The best option to ensure that either the 'other' or 'none of the above' options are at the bottom of the list, is to apply the 'fixed' special setting to those answer options.
This article should be a good place to start:
https://help.surveygizmo.com/help/answer-option-special-settings
I hope this helps!
David
Documentation Specialist
SurveyGizmo Customer Experience
— Marketing on 08/10/2018
Is there an easy way to set it so that 'Other' or 'None of the above' is always at the bottom?