How to redirect or run php plugin after delete row?

sales2010

Well-Known Member
Hello,

I have a form which will generate a pdf file using the php plugin. I encounter the following situation: when user delete the information in form (the button "Delete" is activated), i don't know how to run the php plugin again (without any aditional step, like to put the users to enter into the form and press "Submit") in order to remove the information from the pdf file.

Thank you
 
I've added an ondeleterows hook to the PHP form plugin. This should allow you to add a script which is triggered when the form record is deleted.
If you needed to combine the add/delete script into one file you might consider branching its logic based on the form task, so to check for deletion do:

PHP:
$app = JFactory::getApplication();
if ($app->input->get('task') === 'delete')
{
  // Delete code
}
else
{
  // Insert code
}
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top