Have an idea?

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

Select question drop down in sentence

Hi there,

I was wondering whether there is an option for the dropdown menu (when using the select question) to be in between text?
E.g.: 'I would (drop down: like/not like) to know this'

Right now I solved it by putting the first part of the sentence in the question box and in second part of the sentence the footer box. But I'm not loving the lay-out..

Thanks :)
asked Apr 20, 2020 by Ireen92 (205 points)

1 Answer

+1 vote
 
Best answer
I took a quick stab by adding this code to my select question:

<style>
#[% QuestionName() %] {
    width: auto !important;
}

.spanAround {
    margin-left: 8px;
    margin-right: 8px;
}
</style>

<script>
$(document).ready(function(){
    // Parameters
    var startText = 'start';
    var endText = 'end';

    // Run
    $('#[% QuestionName() %]').before('<span class="spanAround">' + startText + '</span>');
    $('#[% QuestionName() %]').after('<span class="spanAround">' + endText + '</span>');
})
</script>


Lines 15 and 16 can be updated with the text to use.

You can give this a shot and see if it's close to the look you're going for.
answered Apr 20, 2020 by Zachary Platinum Sawtooth Software, Inc. (171,950 points)
selected Apr 20, 2020 by Ireen92
Perfect! Thank you so much!
...