Check out the LimeSurvey source code on GitHub!

Template placeholder not rendered in JavaScript-block

More
5 years 7 months ago #63105 by pchristoph
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

Please Log in to join the conversation.

More
5 years 7 months ago #63106 by pchristoph
I think I can answer this myself: it seems the {URL} placeholder/keyword is only available in the completed.pstpl file.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form