ninja_forms_fields_process

The Ninja Forms ninja forms fields process function.

Description

ninja_forms_fields_process( $form_id ); 

Parameters (1)

0. $form_id
The form id.

Usage

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

Defined (1)

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

/deprecated/includes/display/processing/fields-process.php  
  1. function ninja_forms_fields_process( $form_id ) { 
  2. global $ninja_forms_fields, $ninja_forms_processing; 
  3. //Loop through the submitted form data and call each field's 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. $process_function = $reg_field['process']; 
  16. if($process_function != '') { 
  17. $arguments = array(); 
  18. $arguments['field_id'] = $field_id; 
  19. $user_value = apply_filters( 'ninja_forms_field_process_user_value', $user_value, $field_id ); 
  20. $arguments['user_value'] = $user_value; 
  21. call_user_func_array($process_function, $arguments); 
  22. //}