ricslabb03
Member
Hi
I asked a similar question a few days ago, but have hence got further and run into a few more obstacles that constitute a new thread.
I need to submit a form from a custom button, but instead of redirecting to the respective list I want to redirect to another list. This I know how to do using a calc field that returns a html button and then using a php form plugin onAfterProcess to redirect the form. See code below:
In the calc field:
In the php form plugin onAfterProcess:
The only problem with that set up is that I need to create a session variable of the id of the repeated row which contains the html button I clicked ie {quote_items___id}. Using the JFactory session variables doesn't work since it returns the id of the last repeat row, obviously since I'm using a form plugin to capture the value.
I would like to know if there is a way to save and redirect the form where the URL contains a session variable of the repeated group's rowid?
Thanks
I asked a similar question a few days ago, but have hence got further and run into a few more obstacles that constitute a new thread.
I need to submit a form from a custom button, but instead of redirecting to the respective list I want to redirect to another list. This I know how to do using a calc field that returns a html button and then using a php form plugin onAfterProcess to redirect the form. See code below:
In the calc field:
PHP:
$qiID = '{quote_items___id}';
$session =& JFactory::getSession();
$session->set( 'qiID', $qiID );
$button = '<button class="btn btn-success button save" name="Submit" type="submit">Edit Area Items</button>';
return $button;
In the php form plugin onAfterProcess:
PHP:
$session =& JFactory::getSession();
$qiID = $session->get( 'qiID', '' );
$myUrl = JURI::root().'index.php/area-items?qiid='.$qiID.'&tmpl=component';
header('Location: ' . $myUrl, true, 302);
exit();
The only problem with that set up is that I need to create a session variable of the id of the repeated row which contains the html button I clicked ie {quote_items___id}. Using the JFactory session variables doesn't work since it returns the id of the last repeat row, obviously since I'm using a form plugin to capture the value.
I would like to know if there is a way to save and redirect the form where the URL contains a session variable of the repeated group's rowid?
Thanks