Have an idea?

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

Insert fake next button

Hello everyone,

we have integrated a video in a survey and hidden the next button for the duration of the video. Nevertheless, we assume that some respondents would actually like to do something else during the video or skip them.  That' s why we had the idea to insert a fake next button to record which respondent would have liked to click on next (dummy 1/0).

Is it possible to show a fake next button for a certain time and to record if someone clicked on it?

Thanks in advance!

Many greetings
Nico
asked Oct 26 by Nico Bronze (760 points)

1 Answer

0 votes
I would add a free format question to the same page as your video.  I gave mine a "_Clicked" variable.  I don't know what code you are using to show / hide the real next button, but I believe this code will handle adding the fake button and recording whether it was clicked on:

<input name="[% QuestionName() %]_Clicked" id="[% QuestionName() %]_Clicked" type="hidden" value="0"/>

<style>
#next_button2 {
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    outline: none;
}
</style>

<script>
$(document).on('ssi_ready', function(){
    var nextOriginal = $('#next_button');
    var nextClone = $(nextOriginal).clone();
    nextClone.attr('id', 'next_button2');
    nextOriginal.after(nextClone);
    nextClone.show();
    nextClone.click(function(){
        $('#[% QuestionName() %]_Clicked').val(1);
    });
})
</script>


The code that shows the real button will want to also hide this fake button, of course.
answered Oct 26 by Zachary Platinum Sawtooth Software, Inc. (156,375 points)
...