Have an idea?

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

Adding words/subtitles inside multi-select question items.

I'm doing a multi-select question now and we have more than 30 items for respondents to choose. In order to make items clear, we categorize the items into 3 sections but don't know how to apply our idea in sawtooth. Here's the format we want:

Q1. Choose all the items that apply to you.

Section A
1. item 1
2. item 2

Section B
3. item 3
4. item 4

Section C
5. items 5
6. item 6

We want users to choose all that apply from these 6 items and questions here is how to add subtitles(Section A,B,C) inside items.
asked Oct 31, 2017 by anonymous

1 Answer

0 votes
Please see this question in the Community Library:

answered Oct 31, 2017 by Zachary Platinum Sawtooth Software, Inc. (117,700 points)
Thanks for the link. Since I don't have much knowledge about HTML or Javascript, could you explain how to use that code?
Have you downloaded the question and added it to your survey?
I've downloaded that XML file but can't figure out what to do next. How to add it to my survey?
Are you on v9.3.0 or greater?
yes, on 9.4.0.
On the main Lighthouse Studio window, there is a Library button.  After clicking on that, you can click "Import..." and import the file you downloaded from my link above into your question library.  Then, next time you go to add a question to your survey, you can add this question from your library rather than add a brand new question.
Got it. Thanks!
I'm constructing a list from items chosen from 2 other lists. The constructed list can have 1 to 16 items depending on what is chosen in he original 2 lists.
construct list looks like:

I managed to get the original subtitle syntax to work using variables for the list items:
    // Parameters
    var a=1;
    var b=2;
    var c=3;
    var d=4;
    var subheaders = [
        [a, b, 'Accounts Opened'],
        [c, d, 'Accounts Closed']
 Now I need to now how to set the vars a thru d to the number if items in the list. if 2 items are selected from the Q1 list and 3 items from the Q2 list,  I imagine the code would need to look like:

    // Parameters
    var a=1;
    var b=2;
    var c=3;
    var d=5;
    var subheaders = [
        [a, b, 'Accounts Opened'],
        [c, d, 'Accounts Closed']

but how to set a var to determine the number of items in each of those list? Hope my question makes sense.