Have an idea?

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

Semantic Differential Slider with Don't Know

Zach, hoping you might provide a solution/clarification here.  I have a question that is a Semantic Differential Slider Question and I needed to incorporate a Don’t Know option for each row.  My understanding was the NA per variable from the Question Library should work in this capacity, but I can’t seem to get it to show up.  I have the NA per Variable question placed after my SemDiff and the list pointing to the left column list from the SemDiff and I did change the javascript code to $(window).on('load', function(){ but I still seem to be missing something.  Has there been more that needs to be modified due to different version changes when using the NA per variable with a Semantic Differential?
asked Oct 27 by Jay Rutherford Gold (21,905 points)
I'm not sure what problem you are observing, but two things come to mind.  First, instead of the window.load event, you could use the new ssi_ready event:

$(document).on('ssi_ready', function(){


ssi_ready fires after document.ready and window.load.  Second, I would replace this line:

if (name.startsWith(naQuestion + '_')) {


with this line:

if (name.substr(0, naQuestion.length + 1) == naQuestion + '_') {


You can start by making these changes.  If your problem still persists, can you expound on the behavior you are observing and the browser you are observing it in?
It seems to be working now.  I believe the issue was just simply that I wasn't going into test mode I was just trying to do a quick preview and wasn't seeing the NA option.  I'll test a little further and let you know if other problems persist.  Thanks!
I have it all working well now, but one formatting issue/question.  How can I reduce the width of the NA column that was added?
I believe the N/A column should already be as thin as possible, but you do have an empty table column from your semantic diff's right list.  This CSS will hide that column:

<style>
.right_label_header, .right_label_cell {
    display: none;
}
</style>
Actually I already have that on there.  It just seemed the N/A column used a lot of space where it didn't seem necessary.  But if it can't be reduced then it can't.

I also have another formatting question/request.  I have 19 rows, is there a way I can show the 'Scale Anchor Text' every so many rows, like every 6 or 7 rows?
If you've already added my above code, then you could make the N/A column more narrow with this addition:

.inner_table > tbody > tr > td:last-child {
    width: 1%;
}


Repeating the column headers:

<script>
$(document).ready(function(){
    // Repeat column header row
    var repeatEvery = 5;
    var n = repeatEvery + 1;
    while ($('.inner_table > tbody > tr').length > n + 1) {
        $('.inner_table > tbody > tr:nth-child(' + n + ')').after($('.inner_table > tbody > tr:first-child').clone());
        n += repeatEvery + 1;
    }
    
    // Fix alt colors
    $('.inner_table > tbody > tr:nth-child(odd)').removeClass('alt_color2').addClass('alt_color1');
    $('.inner_table > tbody > tr:nth-child(even)').removeClass('alt_color1').addClass('alt_color2');
})
</script>
Both solutions are perfect!!!  Exactly what I needed to present that question in a user friendly way, thanks so much!
I've had a request here regarding the error message if they didn't select a response or select the don't know for each row.  Is there a way to have the row(s) that are missing a response highlighted/outlined in red or something so they stand out.  There are 19 rows and my client is concerned about it being difficult to see which is missing an answer.

Your answer

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.
...