PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 3.6.65
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v3.6.65
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / app / Services / FormBuilder / DefaultElements.php

DefaultElements.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 3.6.65, at app/Services/FormBuilder/DefaultElements.php

1,443 lines 53.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 $defaultElements = array(
4 'general' => array(
5 'input_name' => array(
6 'index' => 0,
7 'element' => 'input_name',
8 'attributes' => array(
9 'name' => 'names',
10 'data-type' => 'name-element'
11 ),
12 'settings' => array(
13 'container_class' => '',
14 'admin_field_label' => 'Name',
15 'conditional_logics' => array(),
16 'label_placement' => 'top'
17 ),
18 'fields' => array(
19 'first_name' => array(
20 'element' => 'input_text',
21 'attributes' => array(
22 'type' => 'text',
23 'name' => 'first_name',
24 'value' => '',
25 'id' => '',
26 'class' => '',
27 'placeholder' => __('First Name', 'fluentform'),
28 'maxlength' => '',
29 ),
30 'settings' => array(
31 'container_class' => '',
32 'label' => __('First Name', 'fluentform'),
33 'help_message' => '',
34 'visible' => true,
35 'validation_rules' => array(
36 'required' => array(
37 'value' => false,
38 'message' => __('This field is required', 'fluentform'),
39 ),
40 ),
41 'conditional_logics' => array(),
42 ),
43 'editor_options' => array(
44 'template' => 'inputText'
45 ),
46 ),
47 'middle_name' => array(
48 'element' => 'input_text',
49 'attributes' => array(
50 'type' => 'text',
51 'name' => 'middle_name',
52 'value' => '',
53 'id' => '',
54 'class' => '',
55 'placeholder' => __('Middle Name', 'fluentform'),
56 'required' => false,
57 'maxlength' => '',
58 ),
59 'settings' => array(
60 'container_class' => '',
61 'label' => __('Middle Name', 'fluentform'),
62 'help_message' => '',
63 'error_message' => '',
64 'visible' => false,
65 'validation_rules' => array(
66 'required' => array(
67 'value' => false,
68 'message' => __('This field is required', 'fluentform'),
69 ),
70 ),
71 'conditional_logics' => array(),
72 ),
73 'editor_options' => array(
74 'template' => 'inputText'
75 ),
76 ),
77 'last_name' => array(
78 'element' => 'input_text',
79 'attributes' => array(
80 'type' => 'text',
81 'name' => 'last_name',
82 'value' => '',
83 'id' => '',
84 'class' => '',
85 'placeholder' => __('Last Name', 'fluentform'),
86 'required' => false,
87 'maxlength' => '',
88 ),
89 'settings' => array(
90 'container_class' => '',
91 'label' => __('Last Name', 'fluentform'),
92 'help_message' => '',
93 'error_message' => '',
94 'visible' => true,
95 'validation_rules' => array(
96 'required' => array(
97 'value' => false,
98 'message' => __('This field is required', 'fluentform'),
99 ),
100 ),
101 'conditional_logics' => array(),
102 ),
103 'editor_options' => array(
104 'template' => 'inputText'
105 ),
106 ),
107 ),
108 'editor_options' => array(
109 'title' => 'Name Fields',
110 'element' => 'name-fields',
111 'icon_class' => 'ff-edit-name',
112 'template' => 'nameFields'
113 ),
114 ),
115 'input_email' => array(
116 'index' => 1,
117 'element' => 'input_email',
118 'attributes' => array(
119 'type' => 'email',
120 'name' => 'email',
121 'value' => '',
122 'id' => '',
123 'class' => '',
124 'placeholder' => 'Email Address',
125 ),
126 'settings' => array(
127 'container_class' => '',
128 'label' => __('Email', 'fluentform'),
129 'label_placement' => '',
130 'help_message' => '',
131 'admin_field_label' => '',
132 'validation_rules' => array(
133 'required' => array(
134 'value' => false,
135 'message' => __('This field is required', 'fluentform'),
136 ),
137 'email' => array(
138 'value' => true,
139 'message' => __('This field must contain a valid email', 'fluentform'),
140 ),
141 ),
142 'conditional_logics' => array(),
143 'is_unique' => 'no',
144 'unique_validation_message' => __('Email address need to be unique.', 'fluentform')
145 ),
146 'editor_options' => array(
147 'title' => __('Email Address', 'fluentform'),
148 'icon_class' => 'ff-edit-email',
149 'template' => 'inputText'
150 ),
151 ),
152 'input_text' => array(
153 'index' => 2,
154 'element' => 'input_text',
155 'attributes' => array(
156 'type' => 'text',
157 'name' => 'input_text',
158 'value' => '',
159 'class' => '',
160 'placeholder' => '',
161 'maxlength' => '',
162 ),
163 'settings' => array(
164 'container_class' => '',
165 'label' => __('Text Input', 'fluentform'),
166 'label_placement' => '',
167 'admin_field_label' => '',
168 'help_message' => '',
169 'validation_rules' => array(
170 'required' => array(
171 'value' => false,
172 'message' => __('This field is required', 'fluentform'),
173 ),
174 ),
175 'conditional_logics' => array(),
176 'is_unique' => 'no',
177 'unique_validation_message' => __('This value need to be unique.', 'fluentform')
178 ),
179 'editor_options' => array(
180 'title' => __('Simple Text', 'fluentform'),
181 'icon_class' => 'ff-edit-text',
182 'template' => 'inputText'
183 )
184 ),
185 'input_mask' => array(
186 'index' => 2,
187 'element' => 'input_text',
188 'attributes' => array(
189 'type' => 'text',
190 'name' => 'input_mask',
191 'data-mask' => '',
192 'value' => '',
193 'class' => '',
194 'placeholder' => '',
195 ),
196 'settings' => array(
197 'container_class' => '',
198 'label' => __('Mask Input', 'fluentform'),
199 'label_placement' => '',
200 'admin_field_label' => '',
201 'help_message' => '',
202 'temp_mask' => '',
203 'data-mask-reverse' => 'no',
204 'data-clear-if-not-match' => 'no',
205 'validation_rules' => array(
206 'required' => array(
207 'value' => false,
208 'message' => __('This field is required', 'fluentform'),
209 ),
210 ),
211 'conditional_logics' => array(),
212 ),
213 'editor_options' => array(
214 'title' => __('Mask Input', 'fluentform'),
215 'icon_class' => 'ff-edit-mask',
216 'template' => 'inputText'
217 )
218 ),
219 'textarea' => array(
220 'index' => 3,
221 'element' => 'textarea',
222 'attributes' => array(
223 'name' => 'description',
224 'value' => '',
225 'id' => '',
226 'class' => '',
227 'placeholder' => '',
228 'rows' => 3,
229 'cols' => 2,
230 'maxlength' => ''
231 ),
232 'settings' => array(
233 'container_class' => '',
234 'label' => __('Textarea', 'fluentform'),
235 'admin_field_label' => '',
236 'label_placement' => '',
237 'help_message' => '',
238 'validation_rules' => array(
239 'required' => array(
240 'value' => false,
241 'message' => __('This field is required', 'fluentform'),
242 ),
243 ),
244 'conditional_logics' => array()
245 ),
246 'editor_options' => array(
247 'title' => __('Text Area', 'fluentform'),
248 'icon_class' => 'ff-edit-textarea',
249 'template' => 'inputTextarea'
250 ),
251 ),
252 'address' => array(
253 'index' => 4,
254 'element' => 'address',
255 'attributes' => array(
256 'id' => '',
257 'class' => '',
258 'name' => 'address_1',
259 'data-type' => 'address-element'
260 ),
261 'settings' => array(
262 'label' => __('Address', 'fluentform'),
263 'admin_field_label' => 'Address',
264 'conditional_logics' => array(),
265 ),
266 'fields' => array(
267 'address_line_1' => array(
268 'element' => 'input_text',
269 'attributes' => array(
270 'type' => 'text',
271 'name' => 'address_line_1',
272 'value' => '',
273 'id' => '',
274 'class' => '',
275 'placeholder' => __('Address Line 1', 'fluentform'),
276 ),
277 'settings' => array(
278 'container_class' => '',
279 'label' => __('Address Line 1', 'fluentform'),
280 'admin_field_label' => '',
281 'help_message' => '',
282 'visible' => true,
283 'validation_rules' => array(
284 'required' => array(
285 'value' => false,
286 'message' => __('This field is required', 'fluentform'),
287 ),
288 ),
289 'conditional_logics' => array(),
290 ),
291 'editor_options' => array(
292 'template' => 'inputText'
293 ),
294 ),
295 'address_line_2' => array(
296 'element' => 'input_text',
297 'attributes' => array(
298 'type' => 'text',
299 'name' => 'address_line_2',
300 'value' => '',
301 'id' => '',
302 'class' => '',
303 'placeholder' => __('Address Line 2', 'fluentform'),
304 ),
305 'settings' => array(
306 'container_class' => '',
307 'label' => __('Address Line 2', 'fluentform'),
308 'admin_field_label' => '',
309 'help_message' => '',
310 'visible' => true,
311 'validation_rules' => array(
312 'required' => array(
313 'value' => false,
314 'message' => __('This field is required', 'fluentform'),
315 ),
316 ),
317 'conditional_logics' => array(),
318 ),
319 'editor_options' => array(
320 'template' => 'inputText'
321 ),
322 ),
323 'city' => array(
324 'element' => 'input_text',
325 'attributes' => array(
326 'type' => 'text',
327 'name' => 'city',
328 'value' => '',
329 'id' => '',
330 'class' => '',
331 'placeholder' => __('City', 'fluentform'),
332 ),
333 'settings' => array(
334 'container_class' => '',
335 'label' => __('City', 'fluentform'),
336 'admin_field_label' => '',
337 'help_message' => '',
338 'error_message' => '',
339 'visible' => true,
340 'validation_rules' => array(
341 'required' => array(
342 'value' => false,
343 'message' => __('This field is required', 'fluentform'),
344 ),
345 ),
346 'conditional_logics' => array(),
347 ),
348 'editor_options' => array(
349 'template' => 'inputText'
350 ),
351 ),
352 'state' => array(
353 'element' => 'input_text',
354 'attributes' => array(
355 'type' => 'text',
356 'name' => 'state',
357 'value' => '',
358 'id' => '',
359 'class' => '',
360 'placeholder' => __('State', 'fluentform'),
361 ),
362 'settings' => array(
363 'container_class' => '',
364 'label' => __('State', 'fluentform'),
365 'admin_field_label' => '',
366 'help_message' => '',
367 'error_message' => '',
368 'visible' => true,
369 'validation_rules' => array(
370 'required' => array(
371 'value' => false,
372 'message' => __('This field is required', 'fluentform'),
373 ),
374 ),
375 'conditional_logics' => array(),
376 ),
377 'editor_options' => array(
378 'template' => 'inputText'
379 ),
380 ),
381 'zip' => array(
382 'element' => 'input_text',
383 'attributes' => array(
384 'type' => 'text',
385 'name' => 'zip',
386 'value' => '',
387 'id' => '',
388 'class' => '',
389 'placeholder' => __('Zip', 'fluentform'),
390 'required' => false,
391 ),
392 'settings' => array(
393 'container_class' => '',
394 'label' => __('Zip Code', 'fluentform'),
395 'admin_field_label' => '',
396 'help_message' => '',
397 'error_message' => '',
398 'visible' => true,
399 'validation_rules' => array(
400 'required' => array(
401 'value' => false,
402 'message' => __('This field is required', 'fluentform'),
403 ),
404 ),
405 'conditional_logics' => array(),
406 ),
407 'editor_options' => array(
408 'template' => 'inputText'
409 ),
410 ),
411 'country' => array(
412 'element' => 'select_country',
413 'attributes' => array(
414 'name' => 'country',
415 'value' => '',
416 'id' => '',
417 'class' => '',
418 'placeholder' => __('Select Country', 'fluentform'),
419 'required' => false,
420 ),
421 'settings' => array(
422 'container_class' => '',
423 'label' => __('Country', 'fluentform'),
424 'admin_field_label' => '',
425 'help_message' => '',
426 'error_message' => '',
427 'visible' => true,
428 'validation_rules' => array(
429 'required' => array(
430 'value' => false,
431 'message' => __('This field is required', 'fluentform'),
432 ),
433 ),
434 'country_list' => array(
435 'active_list' => 'all',
436 'visible_list' => array(),
437 'hidden_list' => array(),
438 ),
439 'conditional_logics' => array(),
440 ),
441 'options' => array(
442 'US' => 'US of America',
443 'UK' => 'United Kingdom'
444 ),
445 'editor_options' => array(
446 'title' => 'Country List',
447 'element' => 'country-list',
448 'icon_class' => 'icon-text-width',
449 'template' => 'selectCountry'
450 ),
451 ),
452 ),
453 'editor_options' => array(
454 'title' => __('Address Fields', 'fluentform'),
455 'element' => 'address-fields',
456 'icon_class' => 'ff-edit-address',
457 'template' => 'addressFields'
458 ),
459 ),
460 'input_number' => array(
461 'index' => 6,
462 'element' => 'input_number',
463 'attributes' => array(
464 'type' => 'number',
465 'name' => 'numeric-field',
466 'value' => '',
467 'id' => '',
468 'class' => '',
469 'placeholder' => ''
470 ),
471 'settings' => array(
472 'container_class' => '',
473 'label' => __('Numeric Field', 'fluentform'),
474 'admin_field_label' => '',
475 'label_placement' => '',
476 'help_message' => '',
477 'number_step' => '',
478 'prefix_label' => '',
479 'suffix_label' => '',
480 'numeric_formatter' => '',
481 'validation_rules' => array(
482 'required' => array(
483 'value' => false,
484 'message' => __('This field is required', 'fluentform'),
485 ),
486 'numeric' => array(
487 'value' => true,
488 'message' => __('This field must contain numeric value', 'fluentform'),
489 ),
490 'min' => array(
491 'value' => '',
492 'message' => __('Minimum value is ', 'fluentform'),
493 ),
494 'max' => array(
495 'value' => '',
496 'message' => __('Maximum value is ', 'fluentform'),
497 ),
498 ),
499 'conditional_logics' => array(),
500 'calculation_settings' => array(
501 'status' => false,
502 'formula' => ''
503 ),
504 ),
505 'editor_options' => array(
506 'title' => __('Numeric Field', 'fluentform'),
507 'icon_class' => 'ff-edit-numeric',
508 'template' => 'inputText'
509 ),
510 ),
511 'select' => array(
512 'index' => 7,
513 'element' => 'select',
514 'attributes' => array(
515 'name' => 'dropdown',
516 'value' => '',
517 'id' => '',
518 'class' => '',
519 ),
520 'settings' => array(
521 'dynamic_default_value' => '',
522 'label' => __('Dropdown', 'fluentform'),
523 'admin_field_label' => '',
524 'help_message' => '',
525 'container_class' => '',
526 'label_placement' => '',
527 'placeholder' => '- Select -',
528 'advanced_options' => array(
529 [
530 'label' => 'Option 1',
531 'value' => 'Option 1',
532 'calc_value' => ''
533 ],
534 [
535 'label' => 'Option 2',
536 'value' => 'Option 2',
537 'calc_value' => ''
538 ]
539 ),
540 'calc_value_status' => false,
541 'enable_image_input' => false,
542 'enable_select_2' => 'no',
543 'validation_rules' => array(
544 'required' => array(
545 'value' => false,
546 'message' => __('This field is required', 'fluentform'),
547 ),
548 ),
549 'conditional_logics' => array(),
550 'randomize_options' => 'no',
551 ),
552 'editor_options' => array(
553 'title' => __('Dropdown', 'fluentform'),
554 'icon_class' => 'ff-edit-dropdown',
555 'element' => 'select',
556 'template' => 'select'
557 )
558 ),
559 'input_radio' => array(
560 'index' => 8,
561 'element' => 'input_radio',
562 'attributes' => array(
563 'type' => 'radio',
564 'name' => 'input_radio',
565 'value' => '',
566 ),
567 'settings' => array(
568 'dynamic_default_value' => '',
569 'container_class' => '',
570 'label' => __('Radio Field', 'fluentform'),
571 'admin_field_label' => '',
572 'label_placement' => '',
573 'display_type' => '',
574 'help_message' => '',
575 'randomize_options' => 'no',
576 'advanced_options' => array(
577 [
578 'label' => 'Yes',
579 'value' => 'yes',
580 'calc_value' => '',
581 'image' => ''
582 ],
583 [
584 'label' => 'No',
585 'value' => 'no',
586 'calc_value' => '',
587 'image' => ''
588 ]
589 ),
590 'calc_value_status' => false,
591 'enable_image_input' => false,
592 'validation_rules' => array(
593 'required' => array(
594 'value' => false,
595 'message' => __('This field is required', 'fluentform'),
596 ),
597 ),
598 'conditional_logics' => array(),
599 'layout_class' => ''
600 ),
601 'editor_options' => array(
602 'title' => __('Radio Field', 'fluentform'),
603 'icon_class' => 'ff-edit-radio',
604 'element' => 'input-radio',
605 'template' => 'inputCheckable'
606 ),
607 ),
608 'input_checkbox' => array(
609 'index' => 9,
610 'element' => 'input_checkbox',
611 'attributes' => array(
612 'type' => 'checkbox',
613 'name' => 'checkbox',
614 'value' => array(),
615 ),
616 'settings' => array(
617 'dynamic_default_value' => '',
618 'container_class' => '',
619 'label' => __('Checkbox Field', 'fluentform'),
620 'admin_field_label' => '',
621 'label_placement' => '',
622 'display_type' => '',
623 'help_message' => '',
624 'advanced_options' => array(
625 [
626 'label' => 'Item 1',
627 'value' => 'Item 1',
628 'calc_value' => '',
629 'image' => ''
630 ],
631 [
632 'label' => 'Item 2',
633 'value' => 'Item 2',
634 'calc_value' => '',
635 'image' => ''
636 ],
637 [
638 'label' => 'Item 3',
639 'value' => 'Item 3',
640 'calc_value' => '',
641 'image' => ''
642 ]
643 ),
644 'calc_value_status' => false,
645 'enable_image_input' => false,
646 'randomize_options' => 'no',
647 'validation_rules' => array(
648 'required' => array(
649 'value' => false,
650 'message' => __('This field is required', 'fluentform'),
651 ),
652 ),
653 'conditional_logics' => array(),
654 'layout_class' => ''
655 ),
656 'editor_options' => array(
657 'title' => __('Check Box', 'fluentform'),
658 'icon_class' => 'ff-edit-checkbox-1',
659 'template' => 'inputCheckable'
660 ),
661 ),
662 'multi_select' => array(
663 'index' => 10,
664 'element' => 'select',
665 'attributes' => array(
666 'name' => 'multi_select',
667 'value' => array(),
668 'id' => '',
669 'class' => '',
670 'placeholder' => '',
671 'multiple' => true,
672 ),
673 'settings' => array(
674 'dynamic_default_value' => '',
675 'help_message' => '',
676 'container_class' => '',
677 'label' => __('Multiselect', 'fluentform'),
678 'admin_field_label' => '',
679 'label_placement' => '',
680 'placeholder' => '',
681 'max_selection' => '',
682 'advanced_options' => array(
683 [
684 'label' => 'Option 1',
685 'value' => 'Option 1',
686 'calc_value' => ''
687 ],
688 [
689 'label' => 'Option 2',
690 'value' => 'Option 2',
691 'calc_value' => ''
692 ]
693 ),
694 'calc_value_status' => false,
695 'enable_image_input' => false,
696 'validation_rules' => array(
697 'required' => array(
698 'value' => false,
699 'message' => __('This field is required', 'fluentform'),
700 ),
701 ),
702 'conditional_logics' => array(),
703 ),
704 'editor_options' => array(
705 'title' => __('Multiple Choice', 'fluentform'),
706 'icon_class' => 'ff-edit-multiple-choice',
707 'element' => 'select',
708 'template' => 'select'
709 )
710 ),
711 'input_url' => array(
712 'index' => 11,
713 'element' => 'input_url',
714 'attributes' => array(
715 'type' => 'url',
716 'name' => 'url',
717 'value' => '',
718 'class' => '',
719 'placeholder' => '',
720 ),
721 'settings' => array(
722 'container_class' => '',
723 'label' => __('URL', 'fluentform'),
724 'admin_field_label' => '',
725 'label_placement' => '',
726 'help_message' => '',
727 'validation_rules' => array(
728 'required' => array(
729 'value' => false,
730 'message' => __('This field is required', 'fluentform'),
731 ),
732 'url' => array(
733 'value' => true,
734 'message' => __('This field must contain a valid url', 'fluentform'),
735 ),
736 ),
737 'conditional_logics' => array(),
738 ),
739 'editor_options' => array(
740 'title' => __('Website URL', 'fluentform'),
741 'icon_class' => 'ff-edit-website-url',
742 'template' => 'inputText'
743 )
744 ),
745 'input_date' => array(
746 'index' => 13,
747 'element' => 'input_date',
748 'attributes' => array(
749 'type' => 'text',
750 'name' => 'datetime',
751 'value' => '',
752 'id' => '',
753 'class' => '',
754 'placeholder' => '',
755 ),
756 'settings' => array(
757 'container_class' => '',
758 'label' => __('Date / Time', 'fluentform'),
759 'admin_field_label' => '',
760 'label_placement' => '',
761 'date_config' => '',
762 'date_format' => 'd/m/Y',
763 'help_message' => '',
764 'is_time_enabled' => true,
765 'validation_rules' => array(
766 'required' => array(
767 'value' => false,
768 'message' => __('This field is required', 'fluentform'),
769 )
770 ),
771 'conditional_logics' => array(),
772 ),
773 'editor_options' => array(
774 'title' => __('Time & Date', 'fluentform'),
775 'icon_class' => 'ff-edit-date',
776 'template' => 'inputText'
777 ),
778 ),
779 'input_image' => array(
780 'index' => 15,
781 'element' => 'input_image',
782 'attributes' => array(
783 'type' => 'file',
784 'name' => 'image-upload',
785 'value' => '',
786 'id' => '',
787 'class' => '',
788 'accept' => 'image/*',
789 ),
790 'settings' => array(
791 'container_class' => '',
792 'label' => __('Image Upload', 'fluentform'),
793 'admin_field_label' => '',
794 'label_placement' => '',
795 'btn_text' => 'Choose File',
796 'help_message' => '',
797 'validation_rules' => array(
798 'required' => array(
799 'value' => false,
800 'message' => __('This field is required', 'fluentform'),
801 ),
802 'max_file_size' => array(
803 'value' => 1048576,
804 '_valueFrom' => 'MB',
805 'message' => __('Maximum file size limit is 1MB', 'fluentform')
806 ),
807 'max_file_count' => array(
808 'value' => 1,
809 'message' => __('You can upload maximum 1 image', 'fluentform')
810 ),
811 'allowed_image_types' => array(
812 'value' => array(),
813 'message' => __('Allowed image types does not match', 'fluentform')
814 )
815 ),
816 'conditional_logics' => array(),
817 ),
818 'editor_options' => array(
819 'title' => __('Image Upload', 'fluentform'),
820 'icon_class' => 'ff-edit-images',
821 'template' => 'inputFile'
822 ),
823 ),
824 'input_file' => array(
825 'index' => 16,
826 'element' => 'input_file',
827 'attributes' => array(
828 'type' => 'file',
829 'name' => 'file-upload',
830 'value' => '',
831 'id' => '',
832 'class' => '',
833 ),
834 'settings' => array(
835 'container_class' => '',
836 'label' => __('File Upload', 'fluentform'),
837 'admin_field_label' => '',
838 'label_placement' => '',
839 'btn_text' => 'Choose File',
840 'help_message' => '',
841 'validation_rules' => array(
842 'required' => array(
843 'value' => false,
844 'message' => __('This field is required', 'fluentform'),
845 ),
846 'max_file_size' => array(
847 'value' => 1048576,
848 '_valueFrom' => 'MB',
849 'message' => __('Maximum file size limit is 1MB', 'fluentform')
850 ),
851 'max_file_count' => array(
852 'value' => 1,
853 'message' => __('You can upload maximum 1 file', 'fluentform')
854 ),
855 'allowed_file_types' => array(
856 'value' => array(),
857 'message' => __('Invalid file type', 'fluentform')
858 )
859 ),
860 'conditional_logics' => array(),
861 ),
862 'editor_options' => array(
863 'title' => __('File Upload', 'fluentform'),
864 'icon_class' => 'ff-edit-files',
865 'template' => 'inputFile'
866 ),
867 ),
868 'select_country' => array(
869 'index' => 5,
870 'element' => 'select_country',
871 'attributes' => array(
872 'name' => 'country-list',
873 'value' => '',
874 'id' => '',
875 'class' => '',
876 'placeholder' => __('Select Country', 'fluentform'),
877 ),
878 'settings' => array(
879 'container_class' => '',
880 'label' => __('Country', 'fluentform'),
881 'admin_field_label' => '',
882 'label_placement' => '',
883 'help_message' => '',
884 'enable_select_2' => 'no',
885 'validation_rules' => array(
886 'required' => array(
887 'value' => false,
888 'message' => __('This field is required', 'fluentform'),
889 ),
890 ),
891 'country_list' => array(
892 'active_list' => 'all',
893 'visible_list' => array(),
894 'hidden_list' => array(),
895 ),
896 'conditional_logics' => array(),
897 ),
898 'options' => array(
899 'US' => 'United States of America',
900 ),
901 'editor_options' => array(
902 'title' => __('Country List', 'fluentform'),
903 'element' => 'country-list',
904 'icon_class' => 'ff-edit-country',
905 'template' => 'selectCountry'
906 ),
907 ),
908 'custom_html' => array(
909 'index' => 20,
910 'element' => 'custom_html',
911 'attributes' => array(),
912 'settings' => array(
913 'html_codes' => '<p>Some description about this section</p>',
914 'conditional_logics' => array(),
915 'container_class' => ''
916 ),
917 'editor_options' => array(
918 'title' => __('Custom HTML', 'fluentform'),
919 'icon_class' => 'ff-edit-html',
920 'template' => 'customHTML',
921 )
922 ),
923 ),
924 'advanced' => array(
925 'ratings' => array(
926 'index' => 8,
927 'element' => 'ratings',
928 'attributes' => array(
929 'class' => '',
930 'value' => 0,
931 'name' => 'ratings',
932 ),
933 'settings' => array(
934 'label' => __('Ratings', 'fluentform'),
935 'show_text' => 'no',
936 'help_message' => '',
937 'label_placement' => '',
938 'admin_field_label' => '',
939 'container_class' => '',
940 'conditional_logics' => array(),
941 'validation_rules' => array(
942 'required' => array(
943 'value' => false,
944 'message' => __('This field is required', 'fluentform'),
945 ),
946 ),
947 ),
948 'options' => array(
949 '1' => __('Nice', 'fluentform'),
950 '2' => __('Good', 'fluentform'),
951 '3' => __('Very Good', 'fluentform'),
952 '4' => __('Awesome', 'fluentform'),
953 '5' => __('Amazing', 'fluentform'),
954 ),
955 'editor_options' => array(
956 'title' => __('Ratings', 'fluentform'),
957 'icon_class' => 'ff-edit-rating',
958 'template' => 'ratings',
959 ),
960 ),
961 'input_hidden' => array(
962 'index' => 0,
963 'element' => 'input_hidden',
964 'attributes' => array(
965 'type' => 'hidden',
966 'name' => 'hidden',
967 'value' => '',
968 ),
969 'settings' => array(
970 'admin_field_label' => ''
971 ),
972 'editor_options' => array(
973 'title' => __('Hidden Field', 'fluentform'),
974 'icon_class' => 'ff-edit-hidden-field',
975 'template' => 'inputHidden',
976 ),
977 ),
978 'tabular_grid' => array(
979 'index' => 9,
980 'element' => 'tabular_grid',
981 'attributes' => array(
982 'name' => 'tabular_grid',
983 'data-type' => 'tabular-element'
984 ),
985 'settings' => array(
986 'tabular_field_type' => 'checkbox',
987 'container_class' => '',
988 'label' => __('Checkbox Grid', 'fluentform'),
989 'admin_field_label' => '',
990 'label_placement' => '',
991 'help_message' => '',
992 'validation_rules' => array(
993 'required' => array(
994 'value' => false,
995 'message' => __('This field is required', 'fluentform'),
996 'per_row' => false,
997 ),
998 ),
999 'conditional_logics' => array(),
1000 'grid_columns' => array(
1001 'Column-1' => 'Column 1'
1002 ),
1003 'grid_rows' => array(
1004 'Row-1' => 'Row 1'
1005 ),
1006 'selected_grids' => array()
1007 ),
1008 'editor_options' => array(
1009 'title' => __('Checkable Grid', 'fluentform'),
1010 'icon_class' => 'ff-edit-checkable-grid',
1011 'template' => 'checkableGrids'
1012 ),
1013 ),
1014 'section_break' => array(
1015 'index' => 1,
1016 'element' => 'section_break',
1017 'attributes' => array(
1018 'id' => '',
1019 'class' => '',
1020 ),
1021 'settings' => array(
1022 'label' => __('Section Break', 'fluentform'),
1023 'description' => __('Some description about this section', 'fluentform'),
1024 'align' => 'left',
1025 'conditional_logics' => array(),
1026 ),
1027 'editor_options' => array(
1028 'title' => __('Section Break', 'fluentform'),
1029 'icon_class' => 'ff-edit-section-break',
1030 'template' => 'sectionBreak',
1031 ),
1032 ),
1033 'input_password' => array(
1034 'index' => 12,
1035 'element' => 'input_password',
1036 'attributes' => array(
1037 'type' => 'password',
1038 'name' => 'password',
1039 'value' => '',
1040 'id' => '',
1041 'class' => '',
1042 'placeholder' => '',
1043 ),
1044 'settings' => array(
1045 'container_class' => '',
1046 'label' => __('Password', 'fluentform'),
1047 'admin_field_label' => '',
1048 'label_placement' => '',
1049 'help_message' => '',
1050 'validation_rules' => array(
1051 'required' => array(
1052 'value' => false,
1053 'message' => __('This field is required', 'fluentform'),
1054 ),
1055 ),
1056 'conditional_logics' => array(),
1057 ),
1058 'editor_options' => array(
1059 'title' => __('Password Field', 'fluentform'),
1060 'icon_class' => 'ff-edit-password',
1061 'template' => 'inputText'
1062 ),
1063 ),
1064 'form_step' => array(
1065 'index' => 7,
1066 'element' => 'form_step',
1067 'attributes' => [
1068 'id' => '',
1069 'class' => '',
1070 ],
1071 'settings' => [
1072 'prev_btn' => [
1073 'type' => 'default',
1074 'text' => __('Previous', 'fluentform'),
1075 'img_url' => '',
1076 ],
1077 'next_btn' => [
1078 'type' => 'default',
1079 'text' => __('Next', 'fluentform'),
1080 'img_url' => '',
1081 ],
1082 ],
1083 'editor_options' => [
1084 'title' => __('Form Step', 'fluentform'),
1085 'icon_class' => 'ff-edit-step',
1086 'template' => 'formStep',
1087 ],
1088 ),
1089 'terms_and_condition' => array(
1090 'index' => 5,
1091 'element' => 'terms_and_condition',
1092 'attributes' => array(
1093 'type' => 'checkbox',
1094 'name' => 'terms-n-condition',
1095 'value' => false,
1096 'class' => '',
1097 ),
1098 'settings' => array(
1099 'tnc_html' => 'I have read and agree to the <a target="_blank" rel="noopener" href="#">Terms and Conditions</a> and <a target="_blank" rel="noopener" href="#">Privacy Policy</a>',
1100 'has_checkbox' => true,
1101 'admin_field_label' => __('Terms and Conditions', 'fluentform'),
1102 'container_class' => '',
1103 'validation_rules' => array(
1104 'required' => array(
1105 'value' => false,
1106 'message' => __('This field is required', 'fluentform'),
1107 ),
1108 ),
1109 'conditional_logics' => array(),
1110 ),
1111 'editor_options' => array(
1112 'title' => __('Terms & Conditions', 'fluentform'),
1113 'icon_class' => 'ff-edit-terms-condition',
1114 'template' => 'termsCheckbox'
1115 ),
1116 ),
1117 'gdpr_agreement' => array(
1118 'index' => 10,
1119 'element' => 'gdpr_agreement',
1120 'attributes' => array(
1121 'type' => 'checkbox',
1122 'name' => 'gdpr-agreement',
1123 'value' => false,
1124 'class' => 'ff_gdpr_field',
1125 ),
1126 'settings' => array(
1127 'label' => __('GDPR Agreement', 'fluentform'),
1128 'tnc_html' => __('I consent to having this website store my submitted information so they can respond to my inquiry', 'fluentform'),
1129 'admin_field_label' => __('GDPR Agreement', 'fluentform'),
1130 'has_checkbox' => true,
1131 'container_class' => '',
1132 'validation_rules' => array(
1133 'required' => array(
1134 'value' => true,
1135 'message' => __('This field is required', 'fluentform'),
1136 ),
1137 ),
1138 'required_field_message' => '',
1139 'conditional_logics' => array(),
1140 ),
1141 'editor_options' => array(
1142 'title' => __('GDPR Agreement', 'fluentform'),
1143 'icon_class' => 'ff-edit-gdpr',
1144 'template' => 'termsCheckbox'
1145 ),
1146 ),
1147 'recaptcha' => array(
1148 'index' => 2,
1149 'element' => 'recaptcha',
1150 'attributes' => array('name' => 'recaptcha'),
1151 'settings' => array(
1152 'label' => '',
1153 'label_placement' => '',
1154 'validation_rules' => array(),
1155 ),
1156 'editor_options' => array(
1157 'title' => __('reCaptcha', 'fluentform'),
1158 'icon_class' => 'ff-edit-recaptha',
1159 'why_disabled_modal' => 'recaptcha',
1160 'template' => 'recaptcha',
1161 ),
1162 ),
1163 'shortcode' => array(
1164 'index' => 4,
1165 'element' => 'shortcode',
1166 'attributes' => array(
1167 'id' => '',
1168 'class' => ''
1169 ),
1170 'settings' => array(
1171 'shortcode' => '[your_shorcode_here]',
1172 'conditional_logics' => array(),
1173 ),
1174 'editor_options' => array(
1175 'title' => __('Shortcode', 'fluentform'),
1176 'icon_class' => 'ff-edit-shortcode',
1177 'template' => 'shortcode',
1178 )
1179 ),
1180 'action_hook' => array(
1181 'index' => 6,
1182 'element' => 'action_hook',
1183 'attributes' => array(
1184 'id' => '',
1185 'class' => ''
1186 ),
1187 'settings' => array(
1188 'hook_name' => 'YOUR_CUSTOM_HOOK_NAME',
1189 'conditional_logics' => array(),
1190 ),
1191 'editor_options' => array(
1192 'title' => __('Action Hook', 'fluentform'),
1193 'icon_class' => 'ff-edit-action-hook',
1194 'template' => 'actionHook'
1195 )
1196 ),
1197 ),
1198 'container' => array(
1199 'container_1_col' => array(
1200 'index' => 1,
1201 'element' => 'container',
1202 'attributes' => array(),
1203 'settings' => array(
1204 'container_class' => '',
1205 'conditional_logics' => array()
1206 ),
1207 'columns' => array(
1208 array('fields' => array())
1209 ),
1210 'editor_options' =>
1211 array(
1212 'title' => __('One Column Container', 'fluentform'),
1213 'icon_class' => 'dashicons dashicons-align-center',
1214 ),
1215 ),
1216 'container_2_col' => array(
1217 'index' => 1,
1218 'element' => 'container',
1219 'attributes' => array(),
1220 'settings' => array(
1221 'container_class' => '',
1222 'conditional_logics' => array()
1223 ),
1224 'columns' => array(
1225 array('fields' => array()),
1226 array('fields' => array()),
1227 ),
1228 'editor_options' =>
1229 array(
1230 'title' => __('Two Column Container', 'fluentform'),
1231 'icon_class' => 'ff-edit-column-2',
1232 ),
1233 ),
1234 'container_3_col' => array(
1235 'index' => 2,
1236 'element' => 'container',
1237 'attributes' => array(),
1238 'settings' => array(
1239 'container_class' => '',
1240 'conditional_logics' => array()
1241 ),
1242 'columns' => array(
1243 array('fields' => array()),
1244 array('fields' => array()),
1245 array('fields' => array()),
1246 ),
1247 'editor_options' => array(
1248 'title' => __('Three Column Container', 'fluentform'),
1249 'icon_class' => 'ff-edit-three-column',
1250 ),
1251 ),
1252 'container_4_col' => array(
1253 'index' => 3,
1254 'element' => 'container',
1255 'attributes' => array(),
1256 'settings' => array(
1257 'container_class' => '',
1258 'conditional_logics' => array()
1259 ),
1260 'columns' => array(
1261 array('fields' => array()),
1262 array('fields' => array()),
1263 array('fields' => array()),
1264 array('fields' => array()),
1265 ),
1266 'editor_options' => array(
1267 'title' => __('Four Column Container', 'fluentform'),
1268 'icon_class' => 'ff-edit-three-column',
1269 ),
1270 ),
1271 'container_5_col' => array(
1272 'index' => 5,
1273 'element' => 'container',
1274 'attributes' => array(),
1275 'settings' => array(
1276 'container_class' => '',
1277 'conditional_logics' => array()
1278 ),
1279 'columns' => array(
1280 array('fields' => array()),
1281 array('fields' => array()),
1282 array('fields' => array()),
1283 array('fields' => array()),
1284 array('fields' => array()),
1285 ),
1286 'editor_options' => array(
1287 'title' => __('Five Column Container', 'fluentform'),
1288 'icon_class' => 'ff-edit-three-column',
1289 ),
1290 ),
1291 'container_6_col' => array(
1292 'index' => 6,
1293 'element' => 'container',
1294 'attributes' => array(),
1295 'settings' => array(
1296 'container_class' => '',
1297 'conditional_logics' => array()
1298 ),
1299 'columns' => array(
1300 array('fields' => array()),
1301 array('fields' => array()),
1302 array('fields' => array()),
1303 array('fields' => array()),
1304 array('fields' => array()),
1305 array('fields' => array()),
1306 ),
1307 'editor_options' => array(
1308 'title' => __('Six Column Container', 'fluentform'),
1309 'icon_class' => 'ff-edit-three-column',
1310 ),
1311 )
1312 )
1313 );
1314
1315
1316 if (!defined('FLUENTFORMPRO')) {
1317 $defaultElements['general']['phone'] = [
1318 'index' => 15,
1319 'element' => 'phone',
1320 'attributes' => [],
1321 'settings' => [],
1322 'editor_options' => [
1323 'title' => 'Phone Field',
1324 'icon_class' => 'el-icon-phone-outline',
1325 'template' => 'inputText'
1326 ],
1327 ];
1328
1329 $defaultElements['advanced']['net_promoter_score'] = [
1330 'index' => 19,
1331 'element' => 'net_promoter_score',
1332 'attributes' => array(),
1333 'settings' => array(),
1334 'options' => array(),
1335 'editor_options' => array(
1336 'title' => 'Net Promoter Score',
1337 'icon_class' => 'ff-edit-rating',
1338 'template' => 'net_promoter',
1339 )
1340 ];
1341
1342 $defaultElements['advanced']['repeater_field'] = [
1343 'index' => 19,
1344 'element' => 'repeater_field',
1345 'attributes' => array(),
1346 'settings' => array(),
1347 'options' => array(),
1348 'editor_options' => array(
1349 'title' => 'Repeat Field',
1350 'icon_class' => 'ff-edit-repeat',
1351 'template' => 'fieldsRepeatSettings'
1352 )
1353 ];
1354
1355 $defaultElements['advanced']['custom_submit_button'] = [
1356 'index' => 15,
1357 'element' => 'custom_submit_button',
1358 'attributes' => [],
1359 'settings' => [],
1360 'editor_options' => [
1361 'title' => 'Custom Submit Button',
1362 'icon_class' => 'dashicons dashicons-arrow-right-alt',
1363 'template' => 'customButton'
1364 ],
1365 ];
1366
1367 $defaultElements['advanced']['rangeslider'] = [
1368 'index' => 15,
1369 'element' => 'rangeslider',
1370 'attributes' => [],
1371 'settings' => [],
1372 'editor_options' => [
1373 'title' => 'Range Slider',
1374 'icon_class' => 'dashicons dashicons-leftright',
1375 'template' => 'inputSlider'
1376 ],
1377 ];
1378
1379
1380 $defaultElements['advanced']['color-picker'] = [
1381 'index' => 15,
1382 'element' => 'color-picker',
1383 'attributes' => [],
1384 'settings' => [],
1385 'editor_options' => [
1386 'title' => 'Color Picker',
1387 'icon_class' => 'ff-edit-tint',
1388 'template' => 'inputText'
1389 ],
1390 ];
1391
1392 $defaultElements['payments'] = array(
1393 'multi_payment_component' => [
1394 'index' => 6,
1395 'element' => 'multi_payment_component',
1396 'attributes' => [],
1397 'settings' => [],
1398 'editor_options' => array(
1399 'title' => __('Payment Field', 'fluentform'),
1400 'icon_class' => 'ff-edit-shopping-cart',
1401 'element' => 'input-radio',
1402 'template' => 'inputMultiPayment'
1403 ),
1404 ],
1405 'custom_payment_component' => [
1406 'index' => 6,
1407 'element' => 'custom_payment_component',
1408 'attributes' => [],
1409 'settings' => [],
1410 'editor_options' => array(
1411 'title' => __('Custom Payment Amount', 'fluentform'),
1412 'icon_class' => 'ff-edit-keyboard-o',
1413 'template' => 'inputText'
1414 )
1415 ],
1416 'item_quantity_component' => [
1417 'index' => 6,
1418 'element' => 'item_quantity_component',
1419 'attributes' => [],
1420 'settings' => [],
1421 'editor_options' => array(
1422 'title' => __('Item Quantity', 'fluentform'),
1423 'icon_class' => 'ff-edit-keyboard-o',
1424 'template' => 'inputText'
1425 ),
1426 ],
1427 'payment_method' => [
1428 'index' => 6,
1429 'element' => 'payment_method',
1430 'attributes' => [],
1431 'settings' => [],
1432 'editor_options' => array(
1433 'title' => 'Payment Method Field',
1434 'icon_class' => 'ff-edit-credit-card',
1435 'template' => 'inputPaymentMethods'
1436 ),
1437 ]
1438 );
1439 }
1440
1441
1442 return $defaultElements;
1443