I have a public anonymous survey with registration.
On each survey page, I would like to include a link for the participant to opt-out.
I have added the link to the template in startpage.pstpl as "<a href={URL}"/surveys/index.php/optout/tokens/"{SID}"?langcode=en&token="{TOKEN}>Click here to Opt Out of this survey at any time.</a>"
It works except for the {TOKEN}. I'm guessing this is because the survey is anonymous.
Can this be done? Is the TOKEN available in a session variable or anywhere else? I'm thinking it must be somewhere for it to be possible for the system to mark the survey complete in the token table.
The survey designer won't be able to access token variables during the interview to ensure that no token related information find the way into the results.
There were many threads over the years. I've seen to sign so far that LimeSurvey developers have changed their mind about this code-design decision. The typical workaround is to use the URL to get some variables into the interview. But that's not suitable for the token data since it would be saved into the survey results. Which would make no difference than using a non-anonymous survey in the first place.