Have an idea?

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

include group title in between responses

I have a long list, so I want to make a title for each related group to make it easier to choose.

example: https://i.ibb.co/cD2Tv4c/Capture.jpg
(I want to make a title like the highlighted one (Cars))
asked Nov 15 by Ahmed Anwer Bronze (645 points)

1 Answer

0 votes
You can access this feature via the Question Library.


All necessary instructions are provided.
answered Nov 15 by Paul Moon Platinum (85,380 points)
How can I get the title on the right side? https://i.ibb.co/fXbr8zZ/Capture.jpg

(because I'm using Arabic)
also, is editing this part will be enough to function properly if I need to add/remove more options?

"    var subheaders = [
        { min: 1, max: 3, label: 'alpha' },
        { min: 4, max: 6, label: 'beta', },
        { items: [7, 8, 9, 10], label: 'gamma' },
        { min: 10, max: 10, label: 'delta' }
Yes, you can add in more sub-groups in this section of the script.
Thanks, Now I want to the title to be at the right of the page
I have forwarded on an email to Zachary Anderson at Sawtooth Software. He's the generous fellow who wrote the Question Library features.

He should be in contact as soon as his time zone kicks in.
Thank you for your help Paul :)
I can't fully test your situation without knowing what CSS you've already applied to the question, but I'm guessing it's probably just a "direction: rtl;" line.  Please try replacing this line in Subheaders:

$('#[% QuestionName() %]_' + item).closest(closest).before(subheaders[sub].label);

with this:

$('#[% QuestionName() %]_' + item).closest(closest).before('<div class="subheader">' + subheaders[sub].label + '</div>');

Then append this CSS to the question or add this CSS rule to your existing CSS code:

.subheader {
    text-align: right;
Thanks for chiming in here Zachary. Always appreciated buddy.
you're right Zachary it's a "dir=rtl", thanks for your help the title aligned perfectly at the right corner
He's a good man Zachary. Very helpful and supportive.