Check out the LimeSurvey source code on GitHub!

adding variable text on the end page

More
5 years 4 months ago #65262 by steven8000
On the last page, the end page, i want a text that is only visible when a specific answer is given (in a list radio question) in a question somewhere in the survey

So... in the configuration of the survey => end message, i place the code
<script type="text/javascript">
 
	var test={INSERTANS:14865X654X1014};
	alert(test);
 
	if (test==2)
	{
		alert('ok');
	}
 
</script> 

But without result...
anybody an idea?

Please Log in to join the conversation.

More
5 years 4 months ago #65265 by fvillerot
Hi,

Another way for a message on the end page :
use the assessments: activate it, then set an assessemnt of 1 for the specific answer and 0 for all the others. Set an assessment rule with minimum=1 and maximum=1 and that is !

Please Log in to join the conversation.

More
5 years 4 months ago #65300 by tpartner
You can't use {INSERTANS} in the end page.

You will need to use JavaScript to set a cookie to pass the question value from the last page of the survey to the end page. See this post - www.limesurvey.org/en/forum/design-issue...result-message#56853

Another alternative is to use PersistJS - pablotron.org/?cid=1557

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form