- Posts: 13
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Find the survey ID if($('input#fieldnames').length != 0) { var fieldNames = $('input#fieldnames').attr('value'); var tmp = fieldNames.split('X'); var sID = tmp[0]; } // Insert a new div after the progress bar $('<div id="optOutLink" />').insertBefore('#progress-wrapper'); // Style the new div $('#optOutLink').css({ 'text-align':'center' }); // Insert opt out url in the new div $('#optOutLink').html('<P><a href="optout.php?lang=en&sid='+sID+'&token={TOKEN}">Click here to opt out of this survey.</a></p><br>'); }); </script>
To add your post to an old and long thread can minimize the chance for answers.f1refly wrote: I am trying to do this same thing with an opt out link. How would it be accomplished in the current version (2.52?)
If the survey is anonymous, the TOKEN replacements will probably be turned off. Same for variables like {TOKEN:ATTRIBUTE_1} and similar.f1refly wrote: I'm not sure if it just doesn't work in the templates or if it is because my survey is anonymous. Could be both. I'll start a new thread about this.