Welcome, Guest
Username: Password: Remember me

TOPIC: Template placeholder not rendered in JavaScript-block

Template placeholder not rendered in JavaScript-block 3 years 1 month 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.

Re: Template placeholder not rendered in JavaScript-block 3 years 1 month 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.
Moderators: ITEd
Time to create page: 0.124 seconds
Donation Image