Hello. The site that I am working on is a Hawaii Activity Website. Each category has multiple articles describing each activity in that category. I have a form created that I want to insert after each article (each article is on its own page). The form is a short book-it request form and I need to have either the article ID number (or name) returned in the email or the URL Of the current page the user is on when they filled out the form. I followed instructions on previous posts but can only seem to have the category ID returned rather than the actual article ID. I'm wondering if there is a way to have the URL (or article ID) included in the email. I need to have a way of determining which article the user is interested in booking.
Mahalo for any assistance!!
Mahalo for any assistance!!
No answer yet but I was able to get the title of the page in the email. I initially had more than one article on a page so I changed the layout to have a small blurb and then inserted a "read more" and at the end of each article I put the form. I added this code that I found on the another forum question at the end of the form HTML code.
It works..the title appears in the email. I also added {title} to the email template.
I hope this helps you!
Karen
<?php
if ( !$mainframe->isSite() ) { return; }
$doc =& JFactory::getDocument();
//echo '<div>$doc->title :'.print_r($doc->title, true).'</div>';
?>
<input type="hidden" name="title" value='<?=$doc->title?>' />
It works..the title appears in the email. I also added {title} to the email template.
I hope this helps you!
Karen
I'm stumbling along here not really knowing what I'm doing and learning by trial and error. The fact that I was able to help someone else makes my day! 😀
Karen
Karen
hey it works for me too, thanks for posting the codes man!
Ok, super, however i am getting the cateogiry title not the article title!!! help plz, also its important to include {title} in the email template else it doesnt work. thanks all, ans appreciate helping me solve the category title issue.
I found that I had to separate my articles on different pages using the "read more" feature to make this work. Hope that helps!
Karen
Karen
This topic is locked and no more replies can be posted.