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

TOPIC: Template placeholder not rendered in JavaScript-block

Template placeholder not rendered in JavaScript-block 5 years 2 months ago #63105

  • pchristoph
  • pchristoph's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 15
  • Karma: 0
Hi,

I want to add a hidden field to the <form>-object in the DOM which exists in every survey. For that I have added the following JavaScript (using jQuery) to the navigator.pstpl file:
<script>
$(function() {
    $('form#limesurvey').append(
        $('<input>')
            .attr('type', 'hidden')
	    .attr('id', 'passthru')
            .attr('name', 'passthru')
            .val('{URL}')
    );
});
</script>

Now the {URL} placeholder holding the exit URL which otherwise can be used directly in the .pstpl files is not rendered, instead the placeholder stays inside the JavaScript.

Any ideas on how we can get this solved?

Thanks,
Christoph
The administrator has disabled public write access.

Template placeholder not rendered in JavaScript-block 5 years 2 months ago #63106

  • pchristoph
  • pchristoph's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 15
  • Karma: 0
I think I can answer this myself: it seems the {URL} placeholder/keyword is only available in the completed.pstpl file.
The administrator has disabled public write access.
Time to create page: 0.172 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form