cf_custom_fields_submit_button_removal

Remove submit button.

Description

(bool|array) cf_custom_fields_submit_button_removal( (array) $field, (array) $form ); 

Returns (bool|array)

Parameters (2)

0. $field (array)
The field.
1. $form (array)
The form.

Usage

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

Defined (1)

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

/includes/metabox.php  
  1. function cf_custom_fields_submit_button_removal($field, $form ) { 
  2. $type = Caldera_Forms_Field_Util::get_type($field, $form ); 
  3. if( 'button' == $type ) { 
  4. $field['config']['class'] .= ' button'; 
  5. if( $field['config']['type'] === 'submit' ) { 
  6. return false; 
  7. return $field; 
  8.