This is related to another problem I had, but I think this case is a different issue.
I have a "Contact Us" page which uses the eForm snippet to call a form:
[[eForm? &formid=`contactForm` &to=`[email protected]` &tpl=`ContactForm` &report=`ContactFormReport` &thankyou=`ContactFormThankyou` &vericode=`1` &subject=`Message from Heritage website`]]
Which outputs a page like this:
Filling out the form, the snippet then displays a message containing what the user typed in:
This is all fine until I click on the print button.
The print button pops up a new window and uses this code:
<a href="[~id~]#" onclick="popwindow(’[~178~]&pageId=[*id*]’, ’[*title*]’)">
<img src="_images/print.png" title="Print this page" alt="Print this page" /></a>
I’m basically passing the ID of the page through its address as a variable (
pageId) so that I can use it later on the pop up window.
When I click on it I get this output:
I’ve tried a couple of things including calling the snippet both cached and non-cached but I still get the same result.
I thought of passing all the form elements (i.e. [+name+], [+email+], [+message+] etc) through the URL and creating a dedicated popup page just for Contact Us, but this might be a messy way of handling it (especially if the message text is very long and contains special characters).
Any advice on how to tackle this the correct modx way?