We use our internal web site to distribute memos to our employees and need a way for them to acknowledge that they have read and understood the memo. So I thought I'd use the Chronocontact Mambot to insert a simple form.
Has anyone figured out how to get the mambot determine what article it's inserted into so the article id can be submitted as part of the form?
Thanks
Sean
Has anyone figured out how to get the mambot determine what article it's inserted into so the article id can be submitted as part of the form?
Thanks
Sean
Hi Sean,
This code should do the trick:
Bob
This code should do the trick:
<?php
$article_id =& JRequest::getInt('id', '', 'get');
?>
<input type='hidden' name='article_id' value='<?=$article_id?>' />
Bob
Thanks Bob,
That code works if you are in a page where a single article is displayed, but if it's on the Front page or any other blog layout it displays the section ID by the looks of it.
I'll keep looking around there has to be a way to do it....
Sean
That code works if you are in a page where a single article is displayed, but if it's on the Front page or any other blog layout it displays the section ID by the looks of it.
I'll keep looking around there has to be a way to do it....
Sean
Hi ve6sar,
Well yes, on the home page and on blog pages there isn't a 'single' article to identify,
Bob
Well yes, on the home page and on blog pages there isn't a 'single' article to identify,
Bob
To do the page title.
Put this code at the top of your form
then you can use this.
Put this code at the top of your form
<?php
$mydoc =& JFactory::getDocument();
$mytitle = $mydoc->getTitle();
?>
then you can use this.
<input type='hidden' name='article_id' value='<?php echo $mytitle; ?>' />
This topic is locked and no more replies can be posted.