ninja_forms_display_honeypot

Output our honeypot field.

Description

ninja_forms_display_honeypot( (int) $form_id ); 

Parameters (1)

0. $form_id (int)
The form id.

Usage

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

Defined (1)

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

/deprecated/includes/display/form/honeypot.php  
  1. function ninja_forms_display_honeypot( $form_id ) { 
  2. $hp_name = ninja_forms_random_string( 5 ); 
  3. ?> 
  4. <div class="hp-wrap"> 
  5. <label><?php _e( 'If you are a human and are seeing this field, please leave it blank.', 'ninja-forms' ); ?> 
  6. <input type="text" value="" name="_<?php echo $hp_name; ?>"> 
  7. <input type="hidden" value="_<?php echo $hp_name; ?>" name="_hp_name"> 
  8. </label> 
  9. </div> 
  10. <?php