• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Article title in mail

Article title in mail 16 years 10 months ago #3604

  • paul284
  • paul284's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi,
in Facile Forms I used an element with below mentioned value to have the content item title displayed in the mail to the webmaster (for him to be able to see where the form was filled out, I used the mambot to show the same form in several content items).
What I need in RSforms? I had no luck with this thread: www.rsjoomla.com/index.php/RSform-How-To...s-in-forms.html#1385


<?php
$id = ff_getParam('ff_contentid');
if (is_numeric($id))
return ff_selectValue(\"select title_alias from #__content where id=$id\");
else
return \"Not called by mambot.\";
?>

Best regards,
Paul
The administrator has disabled public write access.

Re:Article title in mail 16 years 9 months ago #3680

  • alex
  • alex's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 443
  • Thank you received: 3
Hello Paul,

on RSform!Pro you could add a hidden field (named titleAlias for example) and in the Default Value type:
//&lt;code&gt;
$id = $RSadapter-&gt;getParam($_GET, 'id', 0);
if($id){
    $q = mysql_query(\&quot;SELECT title_alias FROM `\&quot;.$RSadapter-&gt;config['dbprefix'].\&quot;content` WHERE id = '\&quot;.$id.\&quot;'\&quot;«»);
    $title = @mysql_result($q);
     return $title;
}else return 'No content';
//&lt;/code&gt;
<br><br>Post edited by: alex, at: 2008/07/17 10:42
The administrator has disabled public write access.

Re:Article title in mail 16 years 9 months ago #3842

  • jhellein
  • jhellein's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
This worked in 1.5 (the above code did not for me in 1.5)
//<code>
$content_id = $RSadapter->getParam($_GET,'id',0);
if($content_id){
$q = mysql_query(\"SELECT title FROM \".$RSadapter->config.\"content WHERE id = '$content_id' \");
$title = mysql_result($q,0);
}else{
$title = 'No content found';
}
return $title;
//</code>
The administrator has disabled public write access.

Re:Article title in mail 16 years 8 months ago #4508

I can't make the hidden field title work.
I copied and pasted the code in the default parameters on the hidden field but I still see the code on the page of the form, also I received as confirmation the code like this:


We received your contact enquiry which contains the following message:

// $id = $RSadapter->getParam($_GET, 'id', 0); if($id){ $q = mysql_query(

anybody can help?

thanks
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!