ninja_forms_register_field_textbox

The Ninja Forms ninja forms register field textbox function.

Description

ninja_forms_register_field_textbox(); 

Usage

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

Defined (1)

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

/deprecated/includes/fields/textbox.php  
  1. function ninja_forms_register_field_textbox() { 
  2. $args = array( 
  3. 'name' => __( 'Textbox', 'ninja-forms' ),  
  4. 'sidebar' => 'template_fields',  
  5. 'edit_options' => array( 
  6.  
  7. array( 
  8. 'type' => 'hidden',  
  9. 'name' => 'first_name',  
  10. ),  
  11. array( 
  12. 'type' => 'hidden',  
  13. 'name' => 'last_name',  
  14. ),  
  15. array( 
  16. 'type' => 'hidden',  
  17. 'name' => 'user_address_1',  
  18. ),  
  19. array( 
  20. 'type' => 'hidden',  
  21. 'name' => 'user_address_2',  
  22. ),  
  23. array( 
  24. 'type' => 'hidden',  
  25. 'name' => 'user_city',  
  26. ),  
  27. array( 
  28. 'type' => 'hidden',  
  29. 'name' => 'user_zip',  
  30. ),  
  31. array( 
  32. 'type' => 'hidden',  
  33. 'name' => 'user_phone',  
  34. ),  
  35. array( 
  36. 'type' => 'hidden',  
  37. 'name' => 'user_email',  
  38. ),  
  39. array( 
  40. 'type' => 'hidden',  
  41. 'name' => 'user_info_field_group',  
  42. 'default' => 1,  
  43. ),  
  44.  
  45. ),  
  46. 'edit_settings' => array( 
  47. 'restrictions' => array( 
  48. array( 
  49. 'type' => 'checkbox',  
  50. 'name' => 'email',  
  51. 'label' => __( 'Validate as an email address? (Field must be required)', 'ninja-forms' ),  
  52. ),  
  53. array( 
  54. 'type' => 'checkbox',  
  55. 'label' => __( 'Disable Input', 'ninja-forms' ),  
  56. 'name' => 'disable_input',  
  57. ),  
  58. ),  
  59. 'advanced' => array( 
  60. array( 
  61. 'type' => 'checkbox',  
  62. 'name' => 'datepicker',  
  63. 'label' => __( 'Datepicker', 'ninja-forms' ),  
  64. ),  
  65. array( 
  66. 'type' => 'checkbox',  
  67. 'label' => __( 'This is the user\'s state', 'ninja-forms' ),  
  68. 'name' => 'user_state',  
  69. ),  
  70. ),  
  71. ),  
  72. 'display_function' => 'ninja_forms_field_text_display',  
  73. 'save_function' => '',  
  74. 'group' => 'standard_fields',  
  75. 'edit_label' => true,  
  76. 'edit_label_pos' => true,  
  77. 'edit_req' => true,  
  78. 'edit_custom_class' => true,  
  79. 'edit_help' => true,  
  80. 'edit_desc' => true,  
  81. 'edit_meta' => false,  
  82. 'edit_conditional' => true,  
  83. 'edit_autocomplete_off' => true,  
  84. 'conditional' => array( 
  85. 'value' => array( 
  86. 'type' => 'text',  
  87. ),  
  88. ),  
  89. 'pre_process' => 'ninja_forms_field_text_pre_process',  
  90. 'edit_sub_value' => 'nf_field_text_edit_sub_value',  
  91. 'sub_table_value' => 'nf_field_text_sub_table_value',  
  92. 'edit_placeholder' => true,  
  93. ); 
  94.  
  95. ninja_forms_register_field( '_text', $args );