Data Save triggered by dropdown

alex305v 21 Oct, 2016
Is there a way to save to a database based on the selection of a checkbox?. Almost like enable/disable the DB Save option depending if the checkbox is selected or not.

I have a checkbox label 'save' and i have DB Save option that if the checkbox is selected i want the DB Save to not save. Now, i also have other DB Save within the same form that can't be disabled at all.

Is this possible?
GreyHead 21 Oct, 2016
Hi alex305v,

You can use an Event Switcher with a single event called for example 'save'. Drag the DB Save into the Event Switcher save event. The add code to check the checkbox:
<?php
if ( $form->data['checkbox_name'] == 'yes' ) {
  return 'save';
}
?>

Bob
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger