Forums

Include Page/Article Info In Submitted Data

andrew_syd 04 Mar, 2008
Hi, just trying out ChronoForms for the first time and so far I am quite pleased.

I am setting up a site with many articles, some of which will contain an "expression of interest" form (exactly the same on each article). The form is very simple, consisting of basic contact information only, and is the exact same form on each article.

The problem is I can't work out how to include information, such as the article title or URL, to indicate to the recipient which particular article it is being sent from. Otherwise the user would have to manually give this info... Any help would be appreciated.

Thank you!

(using Joomla 1.5.1)
GreyHead 04 Mar, 2008
Hi andrew_syd,

I'm not sure how it works in Joomla 1.5 but in 1.0.x you could use the $mainframe object to get page info. Something like this:
<?php
global $mainframe;
$page_title = $mainframe->getPageTitle();
?>
<input type="hidden" name="page_title" 
  value="<?php echo $page_title; ?>" />
This may still work in 1.5, if not there must be a close equivalent.

Bob
andrew_syd 04 Mar, 2008
Thank you very much for your help. Unfortunately, when I include the coding you suggested, it outputs the Category or Section title (in my case they are the same) instead of the article title.

Any ideas?
Even if it just gives the recipient the URL of the page it was submitted from, that would do!🙂

Thanks again,



Andrew
GreyHead 05 Mar, 2008
Hi Andrew,

You can probably pull itemid out of the current page url and use that??

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