ninja_forms_register_field_list

The Ninja Forms ninja forms register field list function.

Description

ninja_forms_register_field_list(); 

Usage

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

Defined (1)

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

/deprecated/includes/fields/list.php  
  1. function ninja_forms_register_field_list() { 
  2. $args = array( 
  3. 'name' => __( 'List', 'ninja-forms' ),  
  4. 'edit_function' => 'ninja_forms_field_list_edit',  
  5. 'edit_options' => array( 
  6. array( 
  7. 'type' => 'hidden',  
  8. 'name' => 'user_info_field_group',  
  9. ),  
  10. ),  
  11. 'edit_settings' => array( 
  12. 'advanced' => array( 
  13. array( 
  14. 'type' => 'checkbox',  
  15. 'name' => 'user_state',  
  16. 'label' => __( 'This is the user\'s state', 'ninja-forms' ),  
  17. ),  
  18. ),  
  19. ),  
  20. 'display_function' => 'ninja_forms_field_list_display',  
  21. 'group' => 'standard_fields',  
  22. 'edit_label' => true,  
  23. 'edit_label_pos' => true,  
  24. 'edit_req' => true,  
  25. 'edit_custom_class' => true,  
  26. 'edit_help' => true,  
  27. 'edit_desc' => true,  
  28. 'edit_meta' => false,  
  29. 'sidebar' => 'template_fields',  
  30. 'edit_conditional' => true,  
  31. 'conditional' => array( 
  32. 'action' => array( 
  33. 'show' => array( 
  34. 'name' => __( 'Show This', 'ninja-forms' ),  
  35. 'js_function' => 'show',  
  36. 'output' => 'hide',  
  37. ),  
  38. 'hide' => array( 
  39. 'name' => __( 'Hide This', 'ninja-forms' ),  
  40. 'js_function' => 'hide',  
  41. 'output' => 'hide',  
  42. ),  
  43. 'change_value' => array( 
  44. 'name' => __( 'Selected Value', 'ninja-forms' ),  
  45. 'js_function' => 'change_value',  
  46. 'output' => 'list',  
  47. ),  
  48. 'add_value' => array( 
  49. 'name' => __( 'Add Value', 'ninja-forms' ),  
  50. 'js_function' => 'add_value',  
  51. ),  
  52. 'remove_value' => array( 
  53. 'name' => __( 'Remove Value', 'ninja-forms' ),  
  54. 'js_function' => 'remove_value',  
  55. 'output' => 'list',  
  56. ),  
  57. ),  
  58. 'value' => array( 
  59. 'type' => 'list',  
  60. ),  
  61. ),  
  62. 'edit_sub_value' => 'nf_field_list_edit_sub_value',  
  63. 'sub_table_value' => 'nf_field_list_sub_table_value',  
  64. ); 
  65.  
  66. ninja_forms_register_field('_list', $args);