Welcome, Guest
Username: Password: Remember me

TOPIC: adding variable text on the end page

adding variable text on the end page 3 years 2 weeks 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.

Re: adding variable text on the end page 3 years 2 weeks 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.

Re: adding variable text on the end page 3 years 1 week ago #65300

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4182
  • Thank you received: 785
  • Karma: 359
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.139 seconds
Donation Image