Hi i am trying to add a quick save with the event switcher but can't get it done.
I got 2 buttons in my form that will define the Quick Save and continus edit or Save and Close:
And in the Event Switcher i have this code:
I what the event switcher cases to work as redirects.
My Setup structure is as follows:
On submit
- Update Database
- Event Switcher
- Custome Code - Redirect - Quick Save *
- Custome Code - Redirect - Save and Close *
* (redirect links are double checked and are correct)
But no matter what button i click i always get fail = Save and Close
Anyone can see what i am doing wrong?
I got 2 buttons in my form that will define the Quick Save and continus edit or Save and Close:
<div>
<button name="savebutton" id="savebutton" type="submit" value="quicksave" data-load-state="">Quick Save</button>
</div>
... Form Fields ...
<div>
<button name="savebutton" id="savebutton" type="submit" value="save_close" data-load-state="">Save - Close</button>
</div>
And in the Event Switcher i have this code:
Events success,fail
<?php
if ( $form->data['savebutton'] != 'quicksave' ) {
return 'success';
} else {
return 'fail';
}
?>
I what the event switcher cases to work as redirects.
My Setup structure is as follows:
On submit
- Update Database
- Event Switcher
- Custome Code - Redirect - Quick Save *
- Custome Code - Redirect - Save and Close *
* (redirect links are double checked and are correct)
But no matter what button i click i always get fail = Save and Close
Anyone can see what i am doing wrong?