cf_custom_fields_prevent_mailer

Filter form database and mailer options if is set as a metabox.

Description

(array) cf_custom_fields_prevent_mailer( $form ); 

Returns (array)

Parameters (1)

0. $form
The form.

Usage

  1. if ( !function_exists( 'cf_custom_fields_prevent_mailer' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'caldera-custom-fields/includes/metabox.php'; 
  3.  
  4. // The form. 
  5. $form = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = cf_custom_fields_prevent_mailer($form); 
  9.  

Defined (2)

The function is defined in the following location(s).

/includes/metabox.php  
  1. function cf_custom_fields_prevent_mailer( $form ) { 
  2. $processors = Caldera_Forms::get_processor_by_type('cf_asmetabox', $form); 
  3. if( !empty( $processors ) ) { 
  4. if( isset( $form['mailer']['on_insert'] ) ) { 
  5. unset( $form['mailer']['on_insert'] ); 
  6. if( !empty( $form['mailer']['db_support'] ) ) { 
  7. $form['mailer']['db_support'] = false; 
  8. return $form; 
  1. function cf_custom_fields_prevent_mailer( $form ) { 
  2. $processors = Caldera_Forms::get_processor_by_type('cf_asmetabox', $form); 
  3. if( !empty( $processors ) ) { 
  4. if( isset( $form['mailer']['on_insert'] ) ) { 
  5. unset( $form['mailer']['on_insert'] ); 
  6. if( !empty( $form['mailer']['db_support'] ) ) { 
  7. $form['mailer']['db_support'] = false; 
  8. return $form;