cf_apply_field_classes

The Caldera Forms cf apply field classes function.

Description

cf_apply_field_classes( $classes, $field, $form ); 

Parameters (3)

0. $classes
The classes.
1. $field
The field.
2. $form
The form.

Usage

  1. if ( !function_exists( 'cf_apply_field_classes' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'caldera-forms/includes/custom_field_class.php'; 
  3.  
  4. // The classes. 
  5. $classes = null; 
  6.  
  7. // The field. 
  8. $field = null; 
  9.  
  10. // The form. 
  11. $form = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = cf_apply_field_classes($classes, $field, $form); 
  15.  

Defined (1)

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

/includes/custom_field_class.php  
  1. function cf_apply_field_classes($classes, $field, $form) { 
  2.  
  3. if(!empty($field['config']['custom_class'])) { 
  4. $classes['control_wrapper'][] = $field['config']['custom_class']; 
  5. return $classes;