ninja_forms_field_submit_display

The Ninja Forms ninja forms field submit display function.

Description

ninja_forms_field_submit_display( $field_id, $data, (string) $form_id = '' ); 

Parameters (3)

0. $field_id
The field id.
1. $data
The data.
2. $form_id — Optional. (string) => ''
The form id.

Usage

  1. if ( !function_exists( 'ninja_forms_field_submit_display' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/fields/submit.php'; 
  3.  
  4. // The field id. 
  5. $field_id = null; 
  6.  
  7. // The data. 
  8. $data = null; 
  9.  
  10. // The form id. 
  11. $form_id = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = ninja_forms_field_submit_display($field_id, $data, $form_id); 
  15.  

Defined (1)

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

/deprecated/includes/fields/submit.php  
  1. function ninja_forms_field_submit_display( $field_id, $data, $form_id = '' ) { 
  2. global $ninja_forms_loading, $ninja_forms_processing; 
  3.  
  4. if ( isset ( $ninja_forms_loading ) ) { 
  5. $form_id = $ninja_forms_loading->get_form_ID(); 
  6. } else { 
  7. $form_id = $ninja_forms_processing->get_form_ID(); 
  8.  
  9. if(isset($data['show_field'])) { 
  10. $show_field = $data['show_field']; 
  11. }else{ 
  12. $show_field = true; 
  13.  
  14. $field_class = ninja_forms_get_field_class( $field_id, $form_id ); 
  15. if(isset($data['label']) AND $data['label'] != '') { 
  16. $label = $data['label']; 
  17. }else{ 
  18. $label = 'Submit'; 
  19. $plugin_settings = nf_get_settings(); 
  20. if ( isset ( $plugin_settings['process_label'] ) ) { 
  21. $processing_msg = $plugin_settings['process_label']; 
  22. ?> 
  23. <div id="nf_submit_<?php echo $form_id; ?>"> 
  24. <input type="submit" name="_ninja_forms_field_<?php echo $field_id;?>" class="<?php echo $field_class;?>" id="ninja_forms_field_<?php echo $field_id;?>" value="<?php echo $label;?>" rel="<?php echo $field_id;?>" > 
  25. </div> 
  26. <div id="nf_processing_<?php echo $form_id; ?>" style="display:none;"> 
  27. <input type="submit" name="_ninja_forms_field_<?php echo $field_id;?>" class="<?php echo $field_class; ?>" id="ninja_forms_field_<?php echo $field_id;?>" value="<?php echo $processing_msg; ?>" rel="<?php echo $field_id;?>" disabled> 
  28. </div> 
  29. <?php 
  30.