FormDisplaySettings.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <?php if ( ! defined( 'ABSPATH' ) ) exit;
  2. return apply_filters( 'ninja_forms_form_display_settings', array(
  3. /*
  4. * FORM TITLE
  5. */
  6. 'title' => array(
  7. 'name' => 'title',
  8. 'type' => 'textbox',
  9. 'label' => __( 'Form Title', 'ninja-forms' ),
  10. 'width' => 'full',
  11. 'group' => 'primary',
  12. 'value' => '',
  13. ),
  14. /*
  15. * SHOW FORM TITLE
  16. */
  17. 'show_title' => array(
  18. 'name' => 'show_title',
  19. 'type' => 'toggle',
  20. 'label' => __( 'Display Form Title', 'ninja-forms' ),
  21. 'width' => 'full',
  22. 'group' => 'primary',
  23. 'value' => 1,
  24. ),
  25. /*
  26. * CLEAR SUCCESSFULLY COMPLETED FORM
  27. */
  28. 'clear_complete' => array(
  29. 'name' => 'clear_complete',
  30. 'type' => 'toggle',
  31. 'label' => __( 'Clear successfully completed form?', 'ninja-forms' ),
  32. 'width' => 'full',
  33. 'group' => 'primary',
  34. 'value' => 1,
  35. 'help' => __( 'If this box is checked, Ninja Forms will clear the form values after it has been successfully submitted.', 'ninja-forms' ),
  36. ),
  37. /*
  38. * HIDE SUCCESSFULLY COMPLETED FORMS
  39. */
  40. 'hide_complete' => array(
  41. 'name' => 'hide_complete',
  42. 'type' => 'toggle',
  43. 'label' => __( 'Hide successfully completed form?', 'ninja-forms' ),
  44. 'width' => 'full',
  45. 'group' => 'primary',
  46. 'value' => 1,
  47. 'help' => __( 'If this box is checked, Ninja Forms will hide the form after it has been successfully submitted.', 'ninja-forms' ),
  48. ),
  49. /*
  50. * Default Label Position
  51. */
  52. 'default_label_pos' => array(
  53. 'name' => 'default_label_pos',
  54. 'type' => 'select',
  55. 'label' => __( 'Default Label Position', 'ninja-forms' ),
  56. 'width' => 'full',
  57. 'group' => 'advanced',
  58. 'options' => array(
  59. array(
  60. 'label' => __( 'Above Element', 'ninja-forms' ),
  61. 'value' => 'above'
  62. ),
  63. array(
  64. 'label' => __( 'Below Element', 'ninja-forms' ),
  65. 'value' => 'below'
  66. ),
  67. array(
  68. 'label' => __( 'Left of Element', 'ninja-forms' ),
  69. 'value' => 'left'
  70. ),
  71. array(
  72. 'label' => __( 'Right of Element', 'ninja-forms' ),
  73. 'value' => 'right'
  74. ),
  75. array(
  76. 'label' => __( 'Hidden', 'ninja-forms' ),
  77. 'value' => 'hidden'
  78. ),
  79. ),
  80. 'value' => 'above',
  81. ),
  82. /*
  83. * Classes
  84. */
  85. 'classes' => array(
  86. 'name' => 'classes',
  87. 'type' => 'fieldset',
  88. 'label' => __( 'Custom Class Names', 'ninja-forms' ),
  89. 'width' => 'full',
  90. 'group' => 'advanced',
  91. 'settings' => array(
  92. array(
  93. 'name' => 'wrapper_class',
  94. 'type' => 'textbox',
  95. 'placeholder' => '',
  96. 'label' => __( 'Wrapper', 'ninja-forms' ),
  97. 'width' => 'one-half',
  98. 'value' => '',
  99. 'use_merge_tags' => FALSE,
  100. ),
  101. array(
  102. 'name' => 'element_class',
  103. 'type' => 'textbox',
  104. 'label' => __( 'Element', 'ninja-forms' ),
  105. 'placeholder' => '',
  106. 'width' => 'one-half',
  107. 'value' => '',
  108. 'use_merge_tags' => FALSE,
  109. ),
  110. ),
  111. ),
  112. /*
  113. * KEY
  114. */
  115. 'key' => array(
  116. 'name' => 'key',
  117. 'type' => 'textbox',
  118. 'label' => __( 'Form Key', 'ninja-forms'),
  119. 'width' => 'full',
  120. 'group' => 'administration',
  121. 'value' => '',
  122. 'help' => __( 'Programmatic name that can be used to reference this form.', 'ninja-forms' ),
  123. ),
  124. /*
  125. * ADD SUBMIT CHECKBOX
  126. */
  127. 'add_submit' => array(
  128. 'name' => 'add_submit',
  129. 'type' => 'toggle',
  130. 'label' => __( 'Add Submit Button', 'ninja-forms'),
  131. 'width' => 'full',
  132. 'group' => '',
  133. 'value' => 1,
  134. 'help' => __( 'We\'ve noticed that don\'t have a submit button on your form. We can add one for your automatically.', 'ninja-forms' ),
  135. ),
  136. /*
  137. * Form Labels
  138. */
  139. 'custom_messages' => array(
  140. 'name' => 'custom_messages',
  141. 'type' => 'fieldset',
  142. 'label' => __( 'Custom Labels', 'ninja-forms' ),
  143. 'width' => 'full',
  144. 'group' => 'advanced',
  145. 'settings' => array(
  146. array(
  147. 'name' => 'changeEmailErrorMsg',
  148. 'type' => 'textbox',
  149. 'label' => __( 'Please enter a valid email address!', 'ninja-forms' ),
  150. 'width' => 'full'
  151. ),
  152. array(
  153. 'name' => 'changeDateErrorMsg',
  154. 'type' => 'textbox',
  155. 'label' => __( 'Please enter a valid date!', 'ninja-forms' ),
  156. 'width' => 'full'
  157. ),
  158. array(
  159. 'name' => 'confirmFieldErrorMsg',
  160. 'type' => 'textbox',
  161. 'label' => __( 'These fields must match!', 'ninja-forms' ),
  162. 'width' => 'full'
  163. ),
  164. array(
  165. 'name' => 'fieldNumberNumMinError',
  166. 'type' => 'textbox',
  167. 'label' => __( 'Number Min Error', 'ninja-forms' ),
  168. 'width' => 'full'
  169. ),
  170. array(
  171. 'name' => 'fieldNumberNumMaxError',
  172. 'type' => 'textbox',
  173. 'label' => __( 'Number Max Error', 'ninja-forms' ),
  174. 'width' => 'full'
  175. ),
  176. array(
  177. 'name' => 'fieldNumberIncrementBy',
  178. 'type' => 'textbox',
  179. 'label' => __( 'Please increment by ', 'ninja-forms' ),
  180. 'width' => 'full'
  181. ),
  182. array(
  183. 'name' => 'formErrorsCorrectErrors',
  184. 'type' => 'textbox',
  185. 'label' => __( 'Please correct errors before submitting this form.', 'ninja-forms' ),
  186. 'width' => 'full'
  187. ),
  188. array(
  189. 'name' => 'validateRequiredField',
  190. 'type' => 'textbox',
  191. 'label' => __( 'This is a required field.', 'ninja-forms' ),
  192. 'width' => 'full'
  193. ),
  194. array(
  195. 'name' => 'honeypotHoneypotError',
  196. 'type' => 'textbox',
  197. 'label' => __( 'Honeypot Error', 'ninja-forms' ),
  198. 'width' => 'full'
  199. ),
  200. array(
  201. 'name' => 'fieldsMarkedRequired',
  202. 'type' => 'textbox',
  203. 'label' => sprintf( __( 'Fields marked with an %s*%s are required', 'ninja-forms' ), '<span class="ninja-forms-req-symbol">', '</span>' ),
  204. 'width' => 'full'
  205. ),
  206. )
  207. ),
  208. /*
  209. * CURRENCY
  210. */
  211. 'currency' => array(
  212. 'name' => 'currency',
  213. 'type' => 'select',
  214. 'options' => array_merge( array( array( 'label' => __( 'Plugin Default', 'ninja-forms' ), 'value' => '' ) ), Ninja_Forms::config( 'Currency' ) ),
  215. 'label' => __( 'Currency', 'ninja-forms' ),
  216. 'width' => 'full',
  217. 'group' => 'advanced',
  218. 'value' => ''
  219. ),
  220. ));