:D Just to feedback with simple code how differentiate events for two submit buttons
in submit action you must insert event switcher and insert php code that uses different names off buttons
in submit action you must insert event switcher and insert php code that uses different names off buttons
<?php
if ($_POST['enviar'])
{
return 'success';
}
elseif($_POST['guardar'])
{
return 'fail';
}
?>
:D Just to feedback with simple code how differentiate events for two submit buttons
in submit action you must insert event switcher and insert php code that uses different names off buttons
<?php
if ($_POST['enviar'])
{
return 'success';
}
elseif($_POST['guardar'])
{
return 'fail';
}
?>
You saved my day๐
Reaaaallllyyyy Thanks man๐
Hi,
teldrive's code is fine - and here's a slightly updated ChronoForms version.
I would change the Events in the Event Switcher to be 'enviar' and 'guardar' (or 'send' and 'save' if you prefer) because these will be easier to understand when you come to re-edit the form later:
Bob
teldrive's code is fine - and here's a slightly updated ChronoForms version.
I would change the Events in the Event Switcher to be 'enviar' and 'guardar' (or 'send' and 'save' if you prefer) because these will be easier to understand when you come to re-edit the form later:
<?php
if ( isset($form->data['guardar']) && $form->data['guardar'] ) {
return 'guardar';
} else if ( isset($form->data['enviar']) && $form->data['enviar'] ) {
return 'enviar';
}
?>
You might also need to handle the case when neither is set!
Bob
This topic is locked and no more replies can be posted.