ninja_forms_register_field_spam

The Ninja Forms ninja forms register field spam function.

Description

ninja_forms_register_field_spam(); 

Usage

  1. if ( !function_exists( 'ninja_forms_register_field_spam' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/fields/spam.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ninja_forms_register_field_spam(); 
  7.  

Defined (1)

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

/deprecated/includes/fields/spam.php  
  1. function ninja_forms_register_field_spam() { 
  2. $args = array( 
  3. 'name' => __( 'Anti-Spam', 'ninja-forms' ),  
  4. 'edit_function' => '',  
  5. 'display_function' => 'ninja_forms_field_spam_display',  
  6. 'group' => 'standard_fields',  
  7. 'edit_label' => false,  
  8. 'edit_label_pos' => true,  
  9. 'edit_req' => false,  
  10. 'edit_custom_class' => true,  
  11. 'edit_help' => true,  
  12. 'edit_meta' => false,  
  13. 'sidebar' => 'template_fields',  
  14. 'display_label' => true,  
  15. 'edit_conditional' => true,  
  16. 'conditional' => array( 
  17. 'value' => array( 
  18. 'type' => 'text',  
  19. ),  
  20. ),  
  21. 'pre_process' => 'ninja_forms_field_spam_pre_process',  
  22. 'process_field' => false,  
  23. 'limit' => 1,  
  24. 'edit_options' => array( 
  25. array( 
  26. 'name' => 'label',  
  27. 'type' => 'text',  
  28. 'label' => __( 'Spam Question', 'ninja-forms' ),  
  29. 'width' => 'wide',  
  30. 'class' => 'widefat',  
  31. ),  
  32. array( 
  33. 'name' => 'spam_answer',  
  34. 'type' => 'text',  
  35. 'label' => __( 'Spam Answer', 'ninja-forms' ),  
  36. 'width' => 'wide',  
  37. 'class' => 'widefat',  
  38. ),  
  39. ),  
  40. 'req' => true,  
  41. ); 
  42.  
  43. ninja_forms_register_field('_spam', $args);