Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: adding variable text on the end page

adding variable text on the end page 5 years 3 months ago #65262

  • steven8000
  • steven8000's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 16
  • Karma: 0
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?
The administrator has disabled public write access.

adding variable text on the end page 5 years 3 months ago #65265

  • fvillerot
  • fvillerot's Avatar
  • Offline
  • Junior Lime
  • Posts: 21
  • Thank you received: 2
  • Karma: 2
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 !
The administrator has disabled public write access.

adding variable text on the end page 5 years 3 months ago #65300

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
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.
The administrator has disabled public write access.
Time to create page: 0.477 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form