Have an idea?

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

[% QuestionName %] in the Page Header

Ok one more...also probably simple.

Survey Settings --> Page Header

<b><u>The question name is: [% QuestionName() %]</b></u>

it does not appear, but if I put the same code in the body it DOES appear.

Is there any way to just default that the question name is shown in the header of every page?
asked Sep 17, 2021 by Nwiggin Bronze (1,785 points)

1 Answer

0 votes
Unfortunately, the QuestionName function doesn't work outside of a specific question.  We can still do this, though.  Place this where you want to display the name of the first question on the page:

<span class="questionName"></span>

Then add this JavaScript to the page header:

    $('.questionName').text($('.question').get(0).id.replace(/_div$/, ''));
answered Sep 17, 2021 by Zachary Platinum Sawtooth Software, Inc. (206,100 points)