• 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: Passing Parameters to rsFormPro

Passing Parameters to rsFormPro 13 years 2 months ago #16340

  • suzeejo
  • suzeejo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 1
I have a form with 2 fields ID and Message. I am calling this form from a link using index.php?option=com_rsform&view=rsform&formId=29. I need to pass an ID in the link that will display in the ID field and then display the message for the ID from a table. I know how to use the default value of the message field and can get the message if I hardcode the ID number, but can't figure out how to reference the parameter so it displays in the ID field.

I found the post "How do I pass a parameter through the URL and how can I catch it", but not sure what the 'myparameter' is referring to. $myparameter_value = JRequest::getVar('myparameter'); do I need to include 'myparameter' in the url? or just the ID number?

I would so appreciate it if someone would be able to show me what the link would look like if I added the ID of 53 to it. What comes after the form number? index.php?option=com_rsform&view=rsform&formId=29
thanks!
The administrator has disabled public write access.

[SOLVED] Re: Passing Parameters to rsFormPro 13 years 2 months ago #16343

  • suzeejo
  • suzeejo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 1
Update:
I was finally able to figure out how to read the parameter passed in the link to open a form.

the link used: (@ID holds the ID of the item clicked on}
index.php?option=com_rsform&view=rsform&formId=29&cid=@ID

the code in the "default value" section of the field that needed to use the parameter
//<code>
$db = JFactory::getDBO();
$myparameter_value = JRequest::getVar('cid');

$db->setQuery("SELECT `subject` FROM `displaytickets` WHERE `id`='".$myparameter_value."' LIMIT 1");
$result = $db->loadResult();
return $result;
//</code>

Works perfectly!
The administrator has disabled public write access.
The following user(s) said Thank You: laf.amyhill
  • 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!