Hi!
I have a form with standard fields (name, phone...) and that form shows in several articles, components... I would like to get web page Title in e-mail, when user submit the mail.
Is it possible? Thanks!
Hi Radu,
Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6.
Bob
4.0 RC1.8 17 Apr 2011 Chronoman
thank you-version
Hi Radu,
In CFv4 drag a Custom Element into the Preview box and add the code there.
Bob
PS I suggest you update to RC1.9 as there are some bug-fixes included.
Parse error: syntax error, unexpected '<' in /administrator/components/com_chronoforms/form_actions/show_html/cfaction_show_html.php(99) : eval()'d code on line 10
Here's what ive done
1.in preview mode i drag custom element
2.paste this code
<?php
$doc =& JFactory::getDocument();
<input type='hidden' name='title' id='title' value='<?php echo $doc->getTitle(); ?>' />
?>
3.tried both options for output code..... in custom element setting
4 save form
5 checked on website
Thank you in advance for this
PS do you think the SEO settings have something to do with the code
Q: in order to do the update i have to save-forms then restore them or will update w chronoforms new version?
Thank you
Hi Radu,
It's working OK.
Bob
I see that
i think you have to baby sit me one more time on this because my email does not collect that value
i've added to the template
<p>Limo Type = {input_custom_10}</p>
but for some reason does not collect the hiden field
do you think i have to add the field in the form in the attachments area?
like field 10?
Than you again Bob
here;s what i collect on the email
Limo = {input_custom_10}
Name = Me
Phone = 1234567890
Email = [email]me@email.com[/email]
Message = blablabla
Submitted by 123.567.890.
Hi Radu,
The name of the hidden input is 'title' so you need {title} in the Email template.
Bob
Hi everyone,
The code mentioned in this thread sends an article title with form.
That's great!
But,
Is there a code that sends an article CONTENT with form?
One type of form would be on several pages, often with similar titles.
I want to be sure from what page the user sent me the form.
regards,
Luke
Hi Luke,
Better to get the article ID which will uniquely identify the article. If you have that (or the title) you can look up the record in the #__content table and get any or all of the contents. NB This won't work reliably on title if there are duplicated titles.
Bob
Hi all,
Just read this post and got everything working. However, as Greyhead already mentioned, this catches the page title. In the last post I read that it would be better to catch the article ID. My question obviously: how to do this?
Thanks GreyHead, code seems to be working fine. Sorry to keep you bothering but how can I now translate the ID to the actual title being mentioned in the email. My client only needs to see from what product page the email was send so he can contact the person who send it right away, knowing in which product he is interested in.
This worked for me too, thanks! But I also would like to have the title, not the article ID show up. If anyone can help that would be so great!
Actually this code shows the page title or something... not the article title or ID. (the menu title?)
I would like it to show the actual article title. I have the form displayed in the article via CF plugin and need the title of that article to show up. Thanks
Hi Greyhead,
Tried what you suggested but instead of getting the title, ,nothing is displayed in the email I receive.
Any idea?
Nice code! Works also with Joomla 2.5.6 and Chronoforms 4.0
Is it also posible to extract the creation date of the article?
Hi bob,
Thanks for the quick reply!
Your code works. Only strange thing is that the creation date of the article is: 2012-09-03 18:00:00
And in the form it says: 2012-09-03 16:00:00
That is 2 hours off? My time zone is Amsterdam...
Thanks bob! Works perfect!
Hi Sjorzzzie,
Great. You should make a note to check when Daylight Saving Time ends in December. It may need to be changed - I don't know how that works.
Bob