• 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: RSForm parameter when calling from an article

RSForm parameter when calling from an article 11 years 4 months ago #25990

  • andi2
  • andi2's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello,

I'm searching for a function to pass a variable when calling rsform from an article. What I'd like to do is to collect a list of items into a session variable which works quite well with PHP Scripts. Now I'd like to get a overview of the items in the session variable and would like to adust i.e. the quantity. Therefore I created another form which will show each item and has a textbox to edit the quantity. To load the correct data into the subform and to adjust the quantity in the correct part of the session I'd like to give the id of the item to the nested form via a parameter. Is that possible?

Here an example:

Mainform with free test element which contains @formlist@.

PHP Script:
$session = & JFactory::getSession();
$sess_example = $session->get('rsform.sess_example');
$output = '';
if(is_array($sess_example)) {
foreach($sess_example as $k => $v) {
$output .= '{rsform 5}';
}
}
$formLayout = preg_replace('/@formlist@/', $output, $formLayout);

Now I need something like:
$output .= '{rsform 5:id=42}';
to be able to get the correct session element inside of the nested form.

I hope the question could be understood. :)

regards,
Andi
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!