ninja_forms_display_process_message

Outputs the HTML for the ajax processing div.

Description

ninja_forms_display_process_message( $form_id ); 

Only used when submitting via ajax.

Parameters (1)

0. $form_id
The form id.

Usage

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

Defined (1)

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

/deprecated/includes/display/form/process-message.php  
  1. function ninja_forms_display_process_message($form_id) { 
  2. global $ninja_forms_processing_error, $ninja_forms_processing_response; 
  3. $plugin_settings = nf_get_settings(); 
  4. $form_row = ninja_forms_get_form_by_id($form_id); 
  5. $process_label = __( $plugin_settings['process_label'], 'ninja-forms' ); 
  6.  
  7. if( isset( $form_row['data']['ajax'] ) ) { 
  8. $ajax = $form_row['data']['ajax']; 
  9. }else{ 
  10. $ajax = 0; 
  11.  
  12. if($ajax == 1) { 
  13. ?> 
  14. <div id="ninja_forms_form_<?php echo $form_id;?>_process_msg" style="display:none;" class="ninja-forms-processing"> 
  15. <?php echo $process_label;?> <img src="<?php echo NINJA_FORMS_URL;?>/images/loading.gif" alt="loading"> 
  16. </div> 
  17. <?php