Forums

Refering Page in Form Results

kairey 03 Nov, 2009
Sorry if this is answered somewhere else but I have spent the last 24 hours trying to fine tune the form to see if it will do what I want.

Basically I have a very simple contact form, name, email, comments and captcha. This will then be inserted into approximately 30-40 pages which are all different outdoor activities.

What I cannot figure out is a way to get the referring page title in the emailed results, without creating a form for every separate activity.

Is there a simple answer?

As soon as I can get this working then I will be purchasing the paid version to lose the link...

Regards
KEVIN
GreyHead 03 Nov, 2009
Hi Kevin,

Add a hidden field to your form and set the value to the page title - that should do the trick
<input type='hidden' name='page_title' value='<?php global $mainframe; echo $mainframe->getPageTitle(); ?>' />

Bob
kairey 03 Nov, 2009
That's kinda what I was thinking about but I don't know where to put the code, I am pretty new to Chronoforms...

Hey you look like Greg Norman in your profile picture ;-)
GreyHead 03 Nov, 2009
Hi Kevin,

Just add it to the form html

Bob

PS Someone else made the Greg Norman comparison a while back - I'll go check.
kairey 03 Nov, 2009
Arghhh thought we were getting somewhere then, I can see the hidden field in the page source code but the email I receive omits it?

http://www.escape2marbella.com/activities/quad-biking

Do I also need to customise the email sent to me to include this field and how is that done?

Thanks and regards

KEVIN
kairey 03 Nov, 2009
I figure it needs to go in the Email Template somehow?
kairey 03 Nov, 2009
Sorted it out tx!

I am interested in {page_title} did the trick in the email template...

Starting to get used to working with Chronoforms, it sinks in eventually 😀
GreyHead 03 Nov, 2009
Hi Kevin,

Yes you got it, sorry it was getting near dinner time here and I wrote the shorthand version.

Bob
This topic is locked and no more replies can be posted.