ninja_forms_fields_post_process

The Ninja Forms ninja forms fields post process function.

Description

ninja_forms_fields_post_process(); 

Usage

  1. if ( !function_exists( 'ninja_forms_fields_post_process' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/display/processing/fields-post-process.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ninja_forms_fields_post_process(); 
  7.  

Defined (1)

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

/deprecated/includes/display/processing/fields-post-process.php  
  1. function ninja_forms_fields_post_process() { 
  2. global $ninja_forms_fields, $ninja_forms_processing; 
  3. //Loop through the submitted form data and call each field's post_processing function, if one exists. 
  4. $form_id = $ninja_forms_processing->get_form_ID(); 
  5. $field_results = $ninja_forms_processing->get_all_fields(); 
  6. if( is_array( $field_results ) AND !empty( $field_results ) ) { 
  7. foreach( $field_results as $field_id => $user_value ) { 
  8. $field = $ninja_forms_processing->get_field_settings( $field_id ); 
  9. $field_id = $field['id']; 
  10. $field_type = $field['type']; 
  11. $field_data = $field['data']; 
  12. if( isset( $ninja_forms_fields[$field_type] ) ) { 
  13. $reg_field = $ninja_forms_fields[$field_type]; 
  14. //if( $reg_field['process_field'] ) { 
  15. $post_process_function = $reg_field['post_process']; 
  16. if($post_process_function != '') { 
  17. $arguments = array(); 
  18. $arguments['field_id'] = $field_id; 
  19. $user_value = apply_filters( 'ninja_forms_field_post_process_user_value', $user_value, $field_id ); 
  20. $arguments['user_value'] = $user_value; 
  21. call_user_func_array($post_process_function, $arguments); 
  22. //}