Caldera_Forms_Fields

Access to field definitions.

Defined (1)

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

/classes/fields.php  
  1. class Caldera_Forms_Fields { 
  2.  
  3. /** 
  4. * Get all field definitions 
  5. * @since 1.5.0 
  6. * @return array 
  7. */ 
  8. public static function get_all() { 
  9.  
  10. /** 
  11. * Register or remove field types 
  12. * @since unknown 
  13. * @param array $field_types Field types 
  14. */ 
  15. $field_types = apply_filters( 'caldera_forms_get_field_types', self::internal_types() ); 
  16.  
  17.  
  18. if ( ! empty( $field_types ) ) { 
  19. foreach ( $field_types as $fieldType => $fieldConfig ) { 
  20. // check for a viewer 
  21. if ( isset( $fieldConfig[ 'viewer' ] ) ) { 
  22. add_filter( 'caldera_forms_view_field_' . $fieldType, $fieldConfig[ 'viewer' ], 10, 3 ); 
  23.  
  24. return $field_types; 
  25.  
  26.  
  27. /** 
  28. * Get definition of one field 
  29. * @since 1.5.0 
  30. * @param string $type Field type 
  31. * @return array 
  32. */ 
  33. public static function definition( $type ) { 
  34. $fields = self::get_all(); 
  35. if( array_key_exists( $type, $fields ) ) { 
  36. return $fields[ $type ]; 
  37.  
  38. return array(); 
  39.  
  40.  
  41. /** 
  42. * Check if a field definition has defined a specific "not support" argument 
  43. * @since 1.5.0 
  44. * @param string $type The field type 
  45. * @param string $not_support The not support argument, for example "entry_list" 
  46. * @return bool|null True if not supported, false if not not supported. Null if invalid field type 
  47. */ 
  48. public static function not_support( $type, $not_support ) { 
  49. $field = self::definition( $type ); 
  50. if( ! empty( $field ) ) { 
  51. if( ! isset( $field[ 'setup' ], $field[ 'setup' ][ 'not_supported' ] ) ) { 
  52. return false; 
  53. if( ! empty( $field[ 'setup' ][ 'not_supported' ] ) && in_array( $not_support, $field[ 'setup' ][ 'not_supported' ] ) ) { 
  54. return true; 
  55.  
  56. return false; 
  57.  
  58. return null; 
  59.  
  60.  
  61. /** 
  62. * Get internal field types without filter 
  63. * @since 1.5.0 
  64. * @return array 
  65. */ 
  66. public static function internal_types() { 
  67. $internal_fields = array( 
  68. //basic 
  69. 'text' => array( 
  70. "field" => __( 'Single Line Text', 'caldera-forms' ),  
  71. "description" => __( 'Single Line Text', 'caldera-forms' ),  
  72. "file" => CFCORE_PATH . "fields/generic-input.php",  
  73. "category" => __( 'Basic', 'caldera-forms' ),  
  74. "setup" => array( 
  75. "template" => CFCORE_PATH . "fields/text/config.php",  
  76. "preview" => CFCORE_PATH . "fields/text/preview.php" 
  77. ),  
  78.  
  79. ),  
  80. 'hidden' => array( 
  81. "field" => __( 'Hidden', 'caldera-forms' ),  
  82. "description" => __( 'Hidden', 'caldera-forms' ),  
  83. "file" => CFCORE_PATH . "fields/hidden/field.php",  
  84. "category" => __( 'Basic', 'caldera-forms' ),  
  85. "static" => true,  
  86. "setup" => array( 
  87. "preview" => CFCORE_PATH . "fields/hidden/preview.php",  
  88. "template" => CFCORE_PATH . "fields/hidden/setup.php",  
  89. "not_supported" => array( 
  90. 'hide_label',  
  91. 'caption',  
  92. 'required',  
  93. ),  
  94. 'email' => array( 
  95. "field" => __( 'Email Address', 'caldera-forms' ),  
  96. "description" => __( 'Email Address', 'caldera-forms' ),  
  97. 'icon' => CFCORE_URL . 'assets/build/images/envelope-o.svg',  
  98. "file" => CFCORE_PATH . "fields/generic-input.php",  
  99. "category" => __( 'Basic', 'caldera-forms' ),  
  100. "setup" => array( 
  101. "preview" => CFCORE_PATH . "fields/email/preview.php",  
  102. "template" => CFCORE_PATH . "fields/email/config.php" 
  103. ),  
  104. 'button' => array( 
  105. "field" => __( 'Button', 'caldera-forms' ),  
  106. "description" => __( 'Button, Submit and Reset types', 'caldera-forms' ),  
  107. "file" => CFCORE_PATH . "fields/button/field.php",  
  108. "category" => __( 'Basic', 'caldera-forms' ),  
  109. "capture" => false,  
  110. "setup" => array( 
  111. "template" => CFCORE_PATH . "fields/button/config_template.php",  
  112. "preview" => CFCORE_PATH . "fields/button/preview.php",  
  113. "default" => array( 
  114. 'class' => 'btn btn-default',  
  115. 'type' => 'submit' 
  116. ),  
  117. "not_supported" => array( 
  118. 'hide_label',  
  119. 'caption',  
  120. 'required',  
  121. 'entry_list' 
  122. ),  
  123. 'phone_better' => array( 
  124. "field" => __( 'Phone Number (Better)', 'caldera-forms' ),  
  125. "description" => __( 'Phone number with advanced options and international formatting', 'caldera-forms' ),  
  126. "file" => CFCORE_PATH . "fields/generic-input.php",  
  127. "category" => __( 'Basic', 'caldera-forms' ),  
  128. 'icon' => CFCORE_URL . 'assets/build/images/mobile.svg',  
  129. "setup" => array( 
  130. "template" => CFCORE_PATH . "fields/phone_better/config.php",  
  131. "preview" => CFCORE_PATH . "fields/phone_better/preview.php",  
  132. "default" => array( 
  133. 'default' => '',  
  134.  
  135. ),  
  136. "scripts" => array( 
  137. CFCORE_URL . 'fields/phone_better/assets/js/intlTelInput.min.js',  
  138. ),  
  139. "styles" => array( 
  140. CFCORE_URL . 'fields/phone_better/assets/css/intlTelInput.css' 
  141. ),  
  142. ),  
  143. 'number' => array( 
  144. "field" => __( 'Number', 'caldera-forms' ),  
  145. "description" => __( 'Number with minimum and maximum controls', 'caldera-forms' ),  
  146. "file" => CFCORE_PATH . "fields/generic-input.php",  
  147. "category" => __( 'Basic', 'caldera-forms' ),  
  148. "setup" => array( 
  149. "preview" => CFCORE_PATH . "fields/number/preview.php",  
  150. "template" => CFCORE_PATH . "fields/number/config.php" 
  151. ),  
  152. 'phone' => array( 
  153. "field" => __( 'Phone Number (Basic)', 'caldera-forms' ),  
  154. "description" => __( 'Phone number with masking', 'caldera-forms' ),  
  155. 'icon' => CFCORE_URL . 'assets/build/images/volume-control-phone.svg',  
  156. "file" => CFCORE_PATH . "fields/generic-input.php",  
  157. "category" => __( 'Basic', 'caldera-forms' ),  
  158. "setup" => array( 
  159. "template" => CFCORE_PATH . "fields/phone/config.php",  
  160. "preview" => CFCORE_PATH . "fields/phone/preview.php",  
  161. "default" => array( 
  162. 'default' => '',  
  163. 'type' => 'local',  
  164. 'custom' => '(999)999-9999' 
  165. ),  
  166. 'paragraph' => array( 
  167. "field" => __( 'Paragraph Textarea', 'caldera-forms' ),  
  168. "description" => __( 'Paragraph Textarea', 'caldera-forms' ),  
  169. "file" => CFCORE_PATH . "fields/paragraph/field.php",  
  170. "category" => __( 'Basic', 'caldera-forms' ),  
  171. "setup" => array( 
  172. "template" => CFCORE_PATH . "fields/paragraph/config_template.php",  
  173. "preview" => CFCORE_PATH . "fields/paragraph/preview.php",  
  174. "default" => array( 
  175. 'rows' => '4' 
  176. ),  
  177. ),  
  178. 'wysiwyg' => array( 
  179. "field" => __( 'Rich Editor', 'caldera-forms' ),  
  180. "description" => __( 'TinyMCE WYSIWYG editor', 'caldera-forms' ),  
  181. "file" => CFCORE_PATH . "fields/wysiwyg/field.php",  
  182. 'icon' => CFCORE_URL . 'assets/build/images/align-justify.svg',  
  183. "category" => __( 'Basic', 'caldera-forms' ),  
  184. "setup" => array( 
  185. "template" => CFCORE_PATH . "fields/wysiwyg/config_template.php",  
  186. "preview" => CFCORE_PATH . "fields/wysiwyg/preview.php",  
  187. ),  
  188. "scripts" => array( 
  189. CFCORE_URL . 'fields/wysiwyg/wysiwyg.js' 
  190. ),  
  191. "styles" => array( 
  192. CFCORE_URL . "fields/wysiwyg/wysiwyg.min.css",  
  193. ),  
  194. ),  
  195. 'url' => array( 
  196. "field" => __( 'URL', 'caldera-forms' ),  
  197. 'icon' => CFCORE_URL . 'assets/build/images/chain.svg',  
  198. "description" => __( 'URL input for website addresses', 'caldera-forms' ),  
  199. "file" => CFCORE_PATH . "fields/generic-input.php",  
  200. "category" => __( 'Basic', 'caldera-forms' ),  
  201. "setup" => array( 
  202. "preview" => CFCORE_PATH . "fields/url/preview.php",  
  203. "template" => CFCORE_PATH . "fields/url/config.php" 
  204. ),  
  205.  
  206. //eCommerce 
  207. 'credit_card_number' => array( 
  208. "field" => __( 'Credit Card Number', 'caldera-forms' ),  
  209. "description" => __( 'Credit Card Number With Validation', 'caldera-forms' ),  
  210. "file" => CFCORE_PATH . "fields/generic-input.php",  
  211. "category" => __( 'eCommerce', 'caldera-forms' ),  
  212. 'icon' => CFCORE_URL . 'assets/build/images/credit-card.svg',  
  213. "setup" => array( 
  214. "template" => CFCORE_PATH . "fields/credit_card_number/config.php",  
  215. "preview" => CFCORE_PATH . "fields/credit_card_number/preview.php" 
  216. ),  
  217. "scripts" => array( 
  218. CFCORE_URL . 'fields/credit_card_number/credit-card.js' 
  219. ),  
  220. 'credit_card_exp' => array( 
  221. "field" => __( 'Credit Card Expiration', 'caldera-forms' ),  
  222. "description" => __( 'Credit Card Expiration Date With Validation', 'caldera-forms' ),  
  223. "file" => CFCORE_PATH . "fields/generic-input.php",  
  224. 'icon' => CFCORE_URL . 'assets/build/images/credit-card.svg',  
  225. "category" => __( 'eCommerce', 'caldera-forms' ),  
  226. "setup" => array( 
  227. "template" => CFCORE_PATH . "fields/credit_card_exp/config.php",  
  228. "preview" => CFCORE_PATH . "fields/credit_card_exp/preview.php" 
  229. ),  
  230. "scripts" => array( 
  231. CFCORE_URL . 'fields/credit_card_number/credit-card.js' 
  232. ),  
  233. 'credit_card_cvc' => array( 
  234. "field" => __( 'Credit Card CVC', 'caldera-forms' ),  
  235. "description" => __( 'Credit Card CVC With Validation', 'caldera-forms' ),  
  236. 'icon' => CFCORE_URL . 'assets/build/images/credit-card.svg',  
  237. "file" => CFCORE_PATH . "fields/generic-input.php",  
  238. "category" => __( 'eCommerce', 'caldera-forms' ),  
  239. "setup" => array( 
  240. "template" => CFCORE_PATH . "fields/credit_card_cvc/config.php",  
  241. "preview" => CFCORE_PATH . "fields/credit_card_cvc/preview.php" 
  242. ),  
  243. "scripts" => array( 
  244. CFCORE_URL . 'fields/credit_card_number/credit-card.js' 
  245. ),  
  246.  
  247.  
  248. //special 
  249. 'calculation' => array( 
  250. "field" => __( 'Calculation', 'caldera-forms' ),  
  251. "file" => CFCORE_PATH . "fields/calculation/field.php",  
  252. "handler" => array( Caldera_Forms::get_instance(), "run_calculation" ),  
  253. 'icon' => CFCORE_URL . 'assets/build/images/calculator.svg',  
  254. "category" => __( 'Special', 'caldera-forms' ),  
  255. "description" => __( 'Calculate values', 'caldera-forms' ),  
  256. "setup" => array( 
  257. "template" => CFCORE_PATH . "fields/calculation/config.php",  
  258. "preview" => CFCORE_PATH . "fields/calculation/preview.php",  
  259. "default" => array( 
  260. 'element' => 'h3',  
  261. 'classes' => 'total-line',  
  262. 'before' => __( 'Total', 'caldera-forms' ) . ':',  
  263. 'after' => '' 
  264. ),  
  265.  
  266. ),  
  267. ),  
  268. 'range_slider' => array( 
  269. "field" => __( 'Range Slider', 'caldera-forms' ),  
  270. "file" => CFCORE_PATH . "fields/range_slider/field.php",  
  271. "category" => __( 'Special', 'caldera-forms' ),  
  272. "description" => __( 'Range Slider input field', 'caldera-forms' ),  
  273. "setup" => array( 
  274. "template" => CFCORE_PATH . "fields/range_slider/config.php",  
  275. "preview" => CFCORE_PATH . "fields/range_slider/preview.php",  
  276. "default" => array( 
  277. 'default' => 1,  
  278. 'step' => 1,  
  279. 'min' => 0,  
  280. 'max' => 100,  
  281. 'showval' => 1,  
  282. 'suffix' => '',  
  283. 'prefix' => '',  
  284. 'color' => '#00ff00',  
  285. 'handle' => '#ffffff',  
  286. 'handleborder' => '#cccccc',  
  287. 'trackcolor' => '#e6e6e6' 
  288. ),  
  289. ),  
  290. "styles" => array( 
  291. CFCORE_URL . "fields/range_slider/rangeslider.css",  
  292. ),  
  293. ),  
  294. 'star_rating' => array( 
  295. "field" => __( 'Star Rating', 'caldera-forms' ),  
  296. "file" => CFCORE_PATH . "fields/star-rate/field.php",  
  297. "category" => __( 'Special', 'caldera-forms' ),  
  298. 'icon' => CFCORE_URL . 'assets/build/images/star.svg',  
  299. "description" => __( 'Star rating input for feedback', 'caldera-forms' ),  
  300. "viewer" => array( Caldera_Forms::get_instance(), 'star_rating_viewer' ),  
  301. "setup" => array( 
  302. "template" => CFCORE_PATH . "fields/star-rate/config.php",  
  303. "preview" => CFCORE_PATH . "fields/star-rate/preview.php",  
  304. "default" => array( 
  305. 'number' => 5,  
  306. 'space' => 3,  
  307. 'size' => 13,  
  308. 'color' => '#FFAA00',  
  309. 'track_color' => '#AFAFAF',  
  310. 'type' => 'star',  
  311. ),  
  312. ),  
  313. "scripts" => array( 
  314. CFCORE_URL . "fields/star-rate/jquery.raty.js",  
  315. ),  
  316.  
  317. //file 
  318. 'file' => array( 
  319. "field" => __( 'File', 'caldera-forms' ),  
  320. "description" => __( 'File Uploader', 'caldera-forms' ),  
  321. "file" => CFCORE_PATH . "fields/file/field.php",  
  322. 'icon' => CFCORE_URL . 'assets/build/images/cloud-upload.svg',  
  323. "viewer" => array( Caldera_Forms::get_instance(), 'handle_file_view' ),  
  324. "category" => __( 'File', 'caldera-forms' ),  
  325. "setup" => array( 
  326. "preview" => CFCORE_PATH . "fields/file/preview.php",  
  327. "template" => CFCORE_PATH . "fields/file/config_template.php" 
  328. ),  
  329. 'advanced_file' => array( 
  330. "field" => __( 'Advanced File Uploader', 'caldera-forms' ),  
  331. 'icon' => CFCORE_URL . 'assets/build/images/cloud-upload.svg',  
  332. "description" => __( 'Inline, multi file uploader', 'caldera-forms' ),  
  333. "file" => CFCORE_PATH . "fields/advanced_file/field.php",  
  334. "viewer" => array( Caldera_Forms::get_instance(), 'handle_file_view' ),  
  335. "category" => __( 'File', 'caldera-forms' ),  
  336. "setup" => array( 
  337. "preview" => CFCORE_PATH . "fields/advanced_file/preview.php",  
  338. "template" => CFCORE_PATH . "fields/advanced_file/config_template.php" 
  339. ),  
  340. "scripts" => array( 
  341. CFCORE_URL . 'fields/advanced_file/uploader.min.js' 
  342. ),  
  343.  
  344. ),  
  345.  
  346. //content 
  347. 'html' => array( 
  348. "field" => __( 'HTML', 'caldera-forms' ),  
  349. "description" => __( 'Add text/html content', 'caldera-forms' ),  
  350. "file" => CFCORE_PATH . "fields/html/field.php",  
  351. "category" => __( 'Content', 'caldera-forms' ),  
  352. "icon" => CFCORE_URL . "fields/html/icon.png",  
  353. "capture" => false,  
  354. "setup" => array( 
  355. "preview" => CFCORE_PATH . "fields/html/preview.php",  
  356. "template" => CFCORE_PATH . "fields/html/config_template.php",  
  357. "not_supported" => array( 
  358. 'hide_label',  
  359. 'caption',  
  360. 'required',  
  361. 'entry_list' 
  362. ),  
  363. 'summary' => array( 
  364. "field" => __( 'Summary', 'caldera-forms' ),  
  365. "description" => __( 'Live updating summary of submission', 'caldera-forms' ),  
  366. "file" => CFCORE_PATH . "fields/summary/field.php",  
  367. "category" => __( 'Content', 'caldera-forms' ),  
  368. 'icon' => CFCORE_URL . 'assets/build/images/list.svg',  
  369. "capture" => false,  
  370. "setup" => array( 
  371. "preview" => CFCORE_PATH . "fields/summary/preview.php",  
  372. "template" => CFCORE_PATH . "fields/summary/config.php",  
  373. "not_supported" => array( 
  374. 'required',  
  375. 'entry_list' 
  376. ),  
  377. 'section_break' => array( 
  378. "field" => __( 'Section Break', 'caldera-forms' ),  
  379. "description" => __( 'An HR tag to separate sections of your form.', 'caldera-forms' ),  
  380. "file" => CFCORE_PATH . "fields/section-break/section-break.php",  
  381. "category" => __( 'Content', 'caldera-forms' ),  
  382. "static" => true,  
  383. "setup" => array( 
  384. "template" => CFCORE_PATH . "fields/section-break/config.php",  
  385. "not_supported" => array( 
  386. 'hide_label',  
  387. 'caption',  
  388. 'required',  
  389. 'entry_list' 
  390. ),  
  391.  
  392. //select 
  393. 'dropdown' => array( 
  394. "field" => __( 'Dropdown Select', 'caldera-forms' ),  
  395. "description" => __( 'Dropdown Select', 'caldera-forms' ),  
  396. 'icon' => CFCORE_URL . 'assets/build/images/plus.svg',  
  397. "file" => CFCORE_PATH . "fields/dropdown/field.php",  
  398. "category" => __( 'Select', 'caldera-forms' ),  
  399. "options" => "single",  
  400. "static" => true,  
  401. "viewer" => array( Caldera_Forms::get_instance(), 'filter_options_calculator' ),  
  402. "setup" => array( 
  403. "template" => CFCORE_PATH . "fields/dropdown/config_template.php",  
  404. "preview" => CFCORE_PATH . "fields/dropdown/preview.php",  
  405. "default" => array(),  
  406. ),  
  407. 'checkbox' => array( 
  408. "field" => __( 'Checkbox', 'caldera-forms' ),  
  409. "description" => __( 'Checkbox', 'caldera-forms' ),  
  410. 'icon' => CFCORE_URL . 'assets/build/images/plus.svg',  
  411. "file" => CFCORE_PATH . "fields/checkbox/field.php",  
  412. "category" => __( 'Select', 'caldera-forms' ),  
  413. "options" => "multiple",  
  414. "static" => true,  
  415. "viewer" => array( Caldera_Forms::get_instance(), 'filter_options_calculator' ),  
  416. "setup" => array( 
  417. "preview" => CFCORE_PATH . "fields/checkbox/preview.php",  
  418. "template" => CFCORE_PATH . "fields/checkbox/config_template.php",  
  419.  
  420. ),  
  421. ),  
  422. 'radio' => array( 
  423. "field" => __( 'Radio', 'caldera-forms' ),  
  424. "description" => __( 'Radio', 'caldera-forms' ),  
  425. 'icon' => CFCORE_URL . 'assets/build/images/plus.svg',  
  426. "file" => CFCORE_PATH . "fields/radio/field.php",  
  427. "category" => __( 'Select', 'caldera-forms' ),  
  428. "options" => true,  
  429. "static" => true,  
  430. "viewer" => array( Caldera_Forms::get_instance(), 'filter_options_calculator' ),  
  431. "setup" => array( 
  432. "preview" => CFCORE_PATH . "fields/radio/preview.php",  
  433. "template" => CFCORE_PATH . "fields/radio/config_template.php",  
  434. ),  
  435. 'filtered_select2' => array( 
  436. "field" => __( 'Autocomplete', 'caldera-forms' ),  
  437. "file" => CFCORE_PATH . "fields/select2/field/field.php",  
  438. 'icon' => CFCORE_URL . 'assets/build/images/plus.svg',  
  439. "category" => __( 'Select', 'caldera-forms' ),  
  440. "description" => 'Select2 dropdown',  
  441. "options" => "multiple",  
  442. "static" => true,  
  443. "setup" => array( 
  444. "template" => CFCORE_PATH . "fields/select2/field/config.php",  
  445. "preview" => CFCORE_PATH . "fields/select2/field/preview.php",  
  446. ),  
  447. "scripts" => array( 
  448. CFCORE_URL . "fields/select2/js/select2.min.js",  
  449. ),  
  450. "styles" => array( 
  451. CFCORE_URL . "fields/select2/css/select2.css",  
  452. ),  
  453. 'date_picker' => array( 
  454. "field" => __( 'Date Picker', 'caldera-forms' ),  
  455. "description" => __( 'Date Picker', 'caldera-forms' ),  
  456. 'icon' => CFCORE_URL . 'assets/build/images/plus.svg',  
  457. "file" => CFCORE_PATH . "fields/date_picker/datepicker.php",  
  458. "category" => __( 'Select', 'caldera-forms' ),  
  459. "setup" => array( 
  460. "preview" => CFCORE_PATH . "fields/date_picker/preview.php",  
  461. "template" => CFCORE_PATH . "fields/date_picker/setup.php",  
  462. "default" => array( 
  463. 'format' => 'yyyy-mm-dd' 
  464. ),  
  465. ),  
  466. 'toggle_switch' => array( 
  467. "field" => __( 'Toggle Switch', 'caldera-forms' ),  
  468. "description" => __( 'Toggle Switch', 'caldera-forms' ),  
  469. "category" => __( 'Select', 'caldera-forms' ),  
  470. 'icon' => CFCORE_URL . 'assets/build/images/plus.svg',  
  471. "file" => CFCORE_PATH . "fields/toggle_switch/field.php",  
  472. "viewer" => array( Caldera_Forms::get_instance(), 'filter_options_calculator' ),  
  473. "options" => "single",  
  474. "static" => true,  
  475. "setup" => array( 
  476. "template" => CFCORE_PATH . "fields/toggle_switch/config_template.php",  
  477. "preview" => CFCORE_PATH . "fields/toggle_switch/preview.php",  
  478. ),  
  479. ),  
  480. 'color_picker' => array( 
  481. "field" => __( 'Color Picker', 'caldera-forms' ),  
  482. "description" => __( 'Color Picker', 'caldera-forms' ),  
  483. 'icon' => CFCORE_URL . 'assets/build/images/paint-brush.svg',  
  484. "category" => __( 'Select', 'caldera-forms' ),  
  485. "file" => CFCORE_PATH . "fields/generic-input.php",  
  486. "setup" => array( 
  487. "preview" => CFCORE_PATH . "fields/color_picker/preview.php",  
  488. "template" => CFCORE_PATH . "fields/color_picker/setup.php",  
  489. "default" => array( 
  490. 'default' => '#FFFFFF' 
  491. ),  
  492. ),  
  493. 'styles' => array( 
  494. CFCORE_URL . 'fields/color_picker/minicolors.min.css' 
  495. ),  
  496. 'states' => array( 
  497. "field" => __( 'State/ Province Select', 'caldera-forms' ),  
  498. 'icon' => CFCORE_URL . 'assets/build/images/plus.svg',  
  499. "description" => __( 'Dropdown select for US states and Canadian provinces.', 'caldera-forms' ),  
  500. "file" => CFCORE_PATH . "fields/states/field.php",  
  501. "category" => __( 'Select', 'caldera-forms' ),  
  502. "placeholder" => false,  
  503. "setup" => array( 
  504. "template" => CFCORE_PATH . "fields/states/config_template.php",  
  505. "preview" => CFCORE_PATH . "fields/states/preview.php",  
  506. "default" => array(),  
  507. ),  
  508.  
  509.  
  510. //discontinued 
  511. 'recaptcha' => array( 
  512. "field" => __( 'reCAPTCHA', 'caldera-forms' ),  
  513. "description" => __( 'reCAPTCHA anti-spam field', 'caldera-forms' ),  
  514. "file" => CFCORE_PATH . "fields/recaptcha/field.php",  
  515. "category" => __( 'Discontinued', 'caldera-forms' ),  
  516. "handler" => array( Caldera_Forms::get_instance(), 'captcha_check' ),  
  517. "capture" => false,  
  518. "setup" => array( 
  519. "template" => CFCORE_PATH . "fields/recaptcha/config.php",  
  520. "preview" => CFCORE_PATH . "fields/recaptcha/preview.php",  
  521. "not_supported" => array( 
  522. 'caption',  
  523. 'required' 
  524. ),  
  525. ),  
  526.  
  527. ); 
  528.  
  529. return $internal_fields; 
  530.