Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Problem with link to survey/opt-out

More
2 hours 45 minutes ago #273050 by leszek.kmiecik
Your LimeSurvey version: 6.15.15+250929 
Own server or LimeSurvey hosting: own server
Survey theme/template: Fruity
==================

I want to link the survey and opt-out addresses to specific text. Therefore, I used this in the template:

<p><a href="{SURVEYURL}" target="_blank">YES</a>, if you agree<br />
<a href="{OPTOUTURL}" target="_blank">NO</a>, if you disagree</p>

Unfortunately, after sending the email, it doesn't display correctly, and it arrives like this:

XYZ.com/index.php/538599?token=KSzDtKyN31Z4PgP&lang=pl " target="_blank">YES, if you agree
XYZ.com/index.php/optout/tokens/538599?t...N31Z4PgP&langcode=pl " target="_blank">NO, if you disagree

I think I have checked everything and I can't figure out how to solve this problem. How can I link the addresses to specific text?

Please Log in to join the conversation.

More
2 hours ago #273053 by holch
I think that {SURVEYURL} and {OPTOUTURL} don't provide a "pure" URL, but rather a fully fletched link including all the "<a href"..." etc. already.

This is why you are running into trouble here.

www.limesurvey.org/manual/Email_templates#Email_placeholders

Here is what the manual says:

{SURVEYURL} The URL to start the survey - if you are sending HTML emails, a full URL will be displayed to the survey participant
@@SURVEYURL@@ The URL to start the survey - this is the barebone link. Use this if you want to integrate the link in your custom HTML elements somewhere (available in v1.90 and later)
{OPTOUTURL} The URL to deactivate sending of emails for the respective survey - a full link will be displayed in the HTML version of the email template


So the solution for the survey url is to use @@SURVEYURL@@. Based on the manual the optout url doesn't seem to have a solution. But you could try @@OPTOUTURL@@ if it works. Who knows.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The following user(s) said Thank You: DenisChenu, leszek.kmiecik

Please Log in to join the conversation.

More
1 hour 48 minutes ago #273056 by leszek.kmiecik
Thank you very much! Both links work correctly:
@@SURVEYURL@@
@@OPTOUTURL@@
The following user(s) said Thank You: holch

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose