Include Page/Article Info In Submitted Data

Post any questions you may have here

Include Page/Article Info In Submitted Data

Postby andrew_syd on Tue Mar 04, 2008 9:25 am

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)
andrew_syd
Fresh Boarder
 
Posts: 2
Joined: Tue Mar 04, 2008 2:13 am

Re:Include Page/Article Info In Submitted Data

Postby GreyHead on Tue Mar 04, 2008 5:27 pm

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:
Code: Select all
<?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
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3779
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:Include Page/Article Info In Submitted Data

Postby andrew_syd on Tue Mar 04, 2008 9:59 pm

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
andrew_syd
Fresh Boarder
 
Posts: 2
Joined: Tue Mar 04, 2008 2:13 am

Re:Include Page/Article Info In Submitted Data

Postby GreyHead on Wed Mar 05, 2008 8:18 pm

Hi Andrew,

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

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3779
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany


Return to ChronoForms Questions & Answers

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests