ninja_forms_display_field_help

Outputs the HTML of the help icon if it is set to display.

Description

ninja_forms_display_field_help( $field_id, $data ); 

Parameters (2)

0. $field_id
The field id.
1. $data
The data.

Usage

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

Defined (1)

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

/deprecated/includes/display/fields/help.php  
  1. function ninja_forms_display_field_help( $field_id, $data ) { 
  2. $plugin_settings = nf_get_settings(); 
  3.  
  4. if( isset( $data['show_help'] ) ) { 
  5. $show_help = $data['show_help']; 
  6. }else{ 
  7. $show_help = 0; 
  8.  
  9. if( isset( $data['help_text'] ) ) { 
  10. $help_text = $data['help_text']; 
  11. }else{ 
  12. $help_text = ''; 
  13.  
  14. $help_text = htmlspecialchars( $help_text ); 
  15.  
  16. if($show_help) { 
  17. ?> 
  18. <img class='ninja-forms-help-text' src="<?php echo NINJA_FORMS_URL;?>images/question-ico.gif" title="<?php echo $help_text;?>" alt="<?php _e( 'Help Text', 'ninja-forms' ); ?>"> 
  19. <?php