ninja_forms_register_field_timed_submit

The Ninja Forms ninja forms register field timed submit function.

Description

ninja_forms_register_field_timed_submit(); 

Usage

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

Defined (1)

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

/deprecated/includes/fields/timed-submit.php  
  1. function ninja_forms_register_field_timed_submit() { 
  2. $args = array( 
  3. 'name' => __( 'Timed Submit', 'ninja-forms' ),  
  4. 'edit_options' => array( 
  5. array( 
  6. 'type' => 'text',  
  7. 'name' => 'label',  
  8. 'label' => __( 'Label', 'ninja-forms' ),  
  9. 'desc' => __( 'Submit button text after timer expires', 'ninja-forms' ),  
  10. 'default' => __( 'Submit' ),  
  11. 'class' => 'widefat ninja-forms-field-label' 
  12. ),  
  13. array( 
  14. 'type' => 'text',  
  15. 'name' => 'timer-text',  
  16. 'label' => __( 'Label', 'ninja-forms' ),  
  17. 'default' => __( 'Please wait %n seconds', 'ninja-forms' ),  
  18. 'desc' => __( '%n will be used to signify the number of seconds', 'ninja-forms' ),  
  19. 'width' => 'wide',  
  20. 'class' => 'widefat ninja-forms-field-label' 
  21. ),  
  22. array( 
  23. 'type' => 'number',  
  24. 'name' => 'countdown',  
  25. 'label' => __( 'Number of seconds for countdown', 'ninja-forms' ),  
  26. 'desc' => __( 'This is how long a user must wait to submit the form', 'ninja-forms' ),  
  27. 'default' => 10,  
  28. ),  
  29. ),  
  30. 'display_function' => 'ninja_forms_field_timed_submit_display',  
  31. 'group' => 'standard_fields',  
  32. 'edit_label' => false,  
  33. 'edit_label_pos' => false,  
  34. 'edit_req' => false,  
  35. 'default_label' => __( 'Submit', 'ninja-forms' ),  
  36. 'edit_desc' => false,  
  37. 'edit_custom_class' => true,  
  38. 'edit_help' => false,  
  39. 'edit_meta' => false,  
  40. 'sidebar' => 'template_fields',  
  41. 'display_label' => false,  
  42. 'edit_conditional' => true,  
  43. 'conditional' => array( 
  44. 'value' => array( 
  45. 'type' => 'text',  
  46. ),  
  47. ),  
  48. 'process_field' => false,  
  49. 'limit' => 1,  
  50. 'visible' => false 
  51. ); 
  52.  
  53. ninja_forms_register_field('_timed_submit', $args);