Developer forum

Forum » CMS - Standard features » Forms for editors - value of submission page in email

Forms for editors - value of submission page in email

Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

we have a globel form, that will be sent from multible pages - and want the info of the page from where the form is submitted to be part of the email we get on submission.

I have tried making hidden field with this value <!--@Global:Pageview.Url-->, and have also tried just adding the field in the template - but none of this works.

How can this be achieved?


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Hans

That would be my suggestion... If you just add the hidden field manually to the template, the submit will not pick it up.

If you add <!--@Global:Pageview.Url--> as the default value in a hidden field created in the forms module, the tag is inserted as part of the rendering and does not get the value.

So you might need to add a line of js to your template instead:

<script>
    document.getElementById("hiddenFormFieldId").value = "<!--@Global:Pageview.Url-->";
</script>

Votes for this answer: 1
 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Ok, that was plan B :)

was thinking maybe there was some other way

 

Will do that :)

 

Have a nice weekend

 

 

You must be logged in to post in the forum