Hi there,
Am almost embarrased to ask this as its so simple, but I'm having a brain meltdown here and I've looked through the book but I can't find what I am looking for!
OK, on page.php I have function:
function checkMiniFormSub() {
$showThanks = "";
if (isset($_GET['formStatus'])){
$showThanks = "<p>Thank you. Your enquiry has been submitted.</p>";
}
echo $showThanks;
}
And on the template I had just called the function with:
<% control checkMiniFormSub %><% end_control %>
All I want to do is check that a form is submitted and return a thank you message on the page it redirects to.
It's all working, but obviously because I'm using an echo it is writing the thank you message at the top of the page, and not where its being called in the template!
So I changed "echo $showThanks;" to "return $showThanks;" but now I have no idea how to get the thank you message to write on the screen via the control as "<% control checkMiniFormSub %>$showThanks<% end_control %>" doesn't work.
DOH!
Thanks :)