• 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: Help with RSForm! Pro Script

Help with RSForm! Pro Script 14 years 3 months ago #12552

Hi Guys,

I'm trying to extra information from my RSForm! Pro form after submission and use it to query the Joomla database, and display it back to the user as follows:

1) Script called on form process ($POST)

// retrieve form data (container numer)
$container = JRequest::getVar('ContainerName');

// create reference to global database
$db =& JFactory::getDBO();

// create query
$query = "SELECT * FROM jos_tracking a".
"INNER JOIN jos_tracking_location b ON a.container = b.container".
"WHERE a.container LIKE '" . $container . "'";


// execute query
$db->setQuery($query);

// return results
$containers = $db->loadObjectList();


2) Script called after form has been processed ($thankYouMessage)

// Thank you message
$thankYouMessage = "Unfortunately, we don't have information at the moment for the container number you've provided. Please do try again later";

// if the container variable is not empty, loop through it and display output
if(count($containers)){

foreach($containers as $container){

echo "<p>". JText::_($container->container) . "</p>";

}

}else{

echo "<p>".$thankYouMessage."</p>";

}

As you can see my script is not functioning. I'm missing something somewhere. I'd be very grateful if someone can put me back on track.

Thank you in advance

B)
The administrator has disabled public write access.

Re:Help with RSForm! Pro Script 14 years 3 months ago #12555

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Hello,

Variables defined in one scripting section can't be used in another section. You could simply move the whole thing in the Scripts called after form process area.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Help with RSForm! Pro Script 14 years 3 months ago #12566

Thanks for your quick response, Admin. I'll use your suggestion. Once more thank you.
The administrator has disabled public write access.

Re:Help with RSForm! Pro Script 14 years 2 months ago #12787

  • ankush1
  • ankush1's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hi Guys,

I'm trying to write a php script that would extra information from a submitted RSForm! Pro form and use it to query the Joomla Database. Below is a screenshot of what i'm trying to do with RSForm! Pro.
The administrator has disabled public write access.

Re:Help with RSForm! Pro Script 14 years 2 months ago #12819

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
@ankush1,

Note that you can't add attachments. Please use a sharing service and post the URL.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
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!