In the contact form, I need to add a new button "Save and add Contribution" that, when pressed:
- save the current contact data
- redirect to the "New contribution" page, possibly with the contact already selected
How can obtain this? Thanks
The way suggested by Jaap is correct. After creating a new extension in the buildForm hook I've inserted the following button:
$form->add('submit', 'SaveAndContribution', ts('Save and Add Contribution'));
and his template. The form is now complete.
At the moment, anyway, I'm not able to distinguish which button was pressed. I had a look at the postProcess hook, but without result.