PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.15
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.15
6.2.15 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 All 197 releases
fluentform / app / Services / FormBuilder / DefaultElements.php

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

1,967 lines 81.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined('ABSPATH') or die;
4
5 $fluentformDefaultGlobalMessages = \FluentForm\App\Helpers\Helper::getAllGlobalDefaultMessages();
6 $fluentformDefaultElements = [
7 'general' => [
8 'input_name' => [
9 'index' => 0,
10 'element' => 'input_name',
11 'attributes' => [
12 'autocomplete' => '',
13 'name' => 'names',
14 'data-type' => 'name-element',
15 ],
16 'settings' => [
17 'container_class' => '',
18 'admin_field_label' => 'Name',
19 'conditional_logics' => [],
20 ],
21 'fields' => [
22 'first_name' => [
23 'element' => 'input_text',
24 'attributes' => [
25 'type' => 'text',
26 'name' => 'first_name',
27 'value' => '',
28 'id' => '',
29 'class' => '',
30 'placeholder' => __('Enter Your First Name', 'fluentform'),
31 'maxlength' => '',
32 ],
33 'settings' => [
34 'container_class' => '',
35 'label' => __('First Name', 'fluentform'),
36 'help_message' => '',
37 'visible' => true,
38 'label_placement' => 'top',
39 'label_placement_options' => [
40 [
41 'value' => '',
42 'label' => __('Default', 'fluentform'),
43 ],
44 [
45 'value' => 'top',
46 'label' => __('Top', 'fluentform'),
47 ],
48 [
49 'value' => 'right',
50 'label' => __('Right', 'fluentform'),
51 ],
52 [
53 'value' => 'bottom',
54 'label' => __('Bottom', 'fluentform'),
55 ],
56 [
57 'value' => 'left',
58 'label' => __('Left', 'fluentform'),
59 ],
60 [
61 'value' => 'hide_label',
62 'label' => __('Hidden', 'fluentform'),
63 ],
64 ],
65 'validation_rules' => [
66 'required' => [
67 'value' => false,
68 'message' => $fluentformDefaultGlobalMessages['required'],
69 'global_message' => $fluentformDefaultGlobalMessages['required'],
70 'global' => true,
71 ],
72 ],
73 'conditional_logics' => [],
74 ],
75 'editor_options' => [
76 'template' => 'inputText',
77 ],
78 ],
79 'middle_name' => [
80 'element' => 'input_text',
81 'attributes' => [
82 'type' => 'text',
83 'name' => 'middle_name',
84 'value' => '',
85 'id' => '',
86 'class' => '',
87 'placeholder' => __('Enter Your Middle Name', 'fluentform'),
88 'required' => false,
89 'maxlength' => '',
90 ],
91 'settings' => [
92 'container_class' => '',
93 'label' => __('Middle Name', 'fluentform'),
94 'help_message' => '',
95 'error_message' => '',
96 'label_placement' => 'top',
97 'label_placement_options' => [
98 [
99 'value' => '',
100 'label' => __('Default', 'fluentform'),
101 ],
102 [
103 'value' => 'top',
104 'label' => __('Top', 'fluentform'),
105 ],
106 [
107 'value' => 'right',
108 'label' => __('Right', 'fluentform'),
109 ],
110 [
111 'value' => 'bottom',
112 'label' => __('Bottom', 'fluentform'),
113 ],
114 [
115 'value' => 'left',
116 'label' => __('Left', 'fluentform'),
117 ],
118 [
119 'value' => 'hide_label',
120 'label' => __('Hidden', 'fluentform'),
121 ],
122 ],
123 'visible' => false,
124 'validation_rules' => [
125 'required' => [
126 'value' => false,
127 'message' => $fluentformDefaultGlobalMessages['required'],
128 'global_message' => $fluentformDefaultGlobalMessages['required'],
129 'global' => true,
130 ],
131 ],
132 'conditional_logics' => [],
133 ],
134 'editor_options' => [
135 'template' => 'inputText',
136 ],
137 ],
138 'last_name' => [
139 'element' => 'input_text',
140 'attributes' => [
141 'type' => 'text',
142 'name' => 'last_name',
143 'value' => '',
144 'id' => '',
145 'class' => '',
146 'placeholder' => __('Enter Your Last Name', 'fluentform'),
147 'required' => false,
148 'maxlength' => '',
149 ],
150 'settings' => [
151 'container_class' => '',
152 'label' => __('Last Name', 'fluentform'),
153 'help_message' => '',
154 'error_message' => '',
155 'label_placement' => 'top',
156 'label_placement_options' => [
157 [
158 'value' => '',
159 'label' => __('Default', 'fluentform'),
160 ],
161 [
162 'value' => 'top',
163 'label' => __('Top', 'fluentform'),
164 ],
165 [
166 'value' => 'right',
167 'label' => __('Right', 'fluentform'),
168 ],
169 [
170 'value' => 'bottom',
171 'label' => __('Bottom', 'fluentform'),
172 ],
173 [
174 'value' => 'left',
175 'label' => __('Left', 'fluentform'),
176 ],
177 [
178 'value' => 'hide_label',
179 'label' => __('Hidden', 'fluentform'),
180 ],
181 ],
182 'visible' => true,
183 'validation_rules' => [
184 'required' => [
185 'value' => false,
186 'message' => $fluentformDefaultGlobalMessages['required'],
187 'global_message' => $fluentformDefaultGlobalMessages['required'],
188 'global' => true,
189 ],
190 ],
191 'conditional_logics' => [],
192 ],
193 'editor_options' => [
194 'template' => 'inputText',
195 ],
196 ],
197 ],
198 'editor_options' => [
199 'title' => __('Name Fields', 'fluentform'),
200 'element' => 'name-fields',
201 'icon_class' => 'ff-edit-name',
202 'template' => 'nameFields',
203 ],
204 ],
205 'input_email' => [
206 'index' => 1,
207 'element' => 'input_email',
208 'attributes' => [
209 'autocomplete' => '',
210 'type' => 'email',
211 'name' => 'email',
212 'value' => '',
213 'id' => '',
214 'class' => '',
215 'placeholder' => 'Email Address',
216 ],
217 'settings' => [
218 'container_class' => '',
219 'label' => __('Email', 'fluentform'),
220 'label_placement' => '',
221 'help_message' => '',
222 'admin_field_label' => '',
223 'prefix_label' => '',
224 'suffix_label' => '',
225 'validation_rules' => [
226 'required' => [
227 'value' => false,
228 'message' => $fluentformDefaultGlobalMessages['required'],
229 'global_message' => $fluentformDefaultGlobalMessages['required'],
230 'global' => true,
231 ],
232 'email' => [
233 'value' => true,
234 'message' => $fluentformDefaultGlobalMessages['email'],
235 'global_message' => $fluentformDefaultGlobalMessages['email'],
236 'global' => true
237 ],
238 ],
239 'conditional_logics' => [],
240 'is_unique' => 'no',
241 'unique_validation_message' => __('Email address need to be unique.', 'fluentform'),
242 ],
243 'editor_options' => [
244 'title' => __('Email', 'fluentform'),
245 'icon_class' => 'ff-edit-email',
246 'template' => 'inputText',
247 ],
248 ],
249 'input_text' => [
250 'index' => 2,
251 'element' => 'input_text',
252 'attributes' => [
253 'autocomplete' => '',
254 'type' => 'text',
255 'name' => 'input_text',
256 'value' => '',
257 'class' => '',
258 'placeholder' => '',
259 'maxlength' => '',
260 ],
261 'settings' => [
262 'container_class' => '',
263 'label' => __('Text Input', 'fluentform'),
264 'label_placement' => '',
265 'admin_field_label' => '',
266 'help_message' => '',
267 'prefix_label' => '',
268 'suffix_label' => '',
269 'validation_rules' => [
270 'required' => [
271 'value' => false,
272 'message' => $fluentformDefaultGlobalMessages['required'],
273 'global_message' => $fluentformDefaultGlobalMessages['required'],
274 'global' => true,
275 ],
276 ],
277 'conditional_logics' => [],
278 'is_unique' => 'no',
279 'unique_validation_message' => __('This value need to be unique.', 'fluentform'),
280 ],
281 'editor_options' => [
282 'title' => __('Simple Text', 'fluentform'),
283 'icon_class' => 'ff-edit-text',
284 'template' => 'inputText',
285 ],
286 ],
287 'input_mask' => [
288 'index' => 2,
289 'element' => 'input_text',
290 'attributes' => [
291 'autocomplete' => '',
292 'type' => 'text',
293 'name' => 'input_mask',
294 'data-mask' => '',
295 'value' => '',
296 'class' => '',
297 'placeholder' => '',
298 ],
299 'settings' => [
300 'container_class' => '',
301 'label' => __('Mask Input', 'fluentform'),
302 'label_placement' => '',
303 'admin_field_label' => '',
304 'help_message' => '',
305 'temp_mask' => '',
306 'prefix_label' => '',
307 'suffix_label' => '',
308 'mobile_keyboard_type' => '',
309 'data-mask-reverse' => 'no',
310 'data-clear-if-not-match' => 'no',
311 'validation_rules' => [
312 'required' => [
313 'value' => false,
314 'message' => $fluentformDefaultGlobalMessages['required'],
315 'global_message' => $fluentformDefaultGlobalMessages['required'],
316 'global' => true,
317 ],
318 ],
319 'conditional_logics' => [],
320 ],
321 'editor_options' => [
322 'title' => __('Mask Input', 'fluentform'),
323 'icon_class' => 'ff-edit-mask',
324 'template' => 'inputText',
325 ],
326 ],
327 'textarea' => [
328 'index' => 3,
329 'element' => 'textarea',
330 'attributes' => [
331 'autocomplete' => '',
332 'name' => 'description',
333 'value' => '',
334 'id' => '',
335 'class' => '',
336 'placeholder' => '',
337 'rows' => 3,
338 'cols' => 2,
339 'maxlength' => '',
340 ],
341 'settings' => [
342 'container_class' => '',
343 'label' => __('Textarea', 'fluentform'),
344 'admin_field_label' => '',
345 'label_placement' => '',
346 'help_message' => '',
347 'prefix_label' => '',
348 'suffix_label' => '',
349 'validation_rules' => [
350 'required' => [
351 'value' => false,
352 'message' => $fluentformDefaultGlobalMessages['required'],
353 'global_message' => $fluentformDefaultGlobalMessages['required'],
354 'global' => true,
355 ],
356 ],
357 'conditional_logics' => [],
358 ],
359 'editor_options' => [
360 'title' => __('Text Area', 'fluentform'),
361 'icon_class' => 'ff-edit-textarea',
362 'template' => 'inputTextarea',
363 ],
364 ],
365 'address' => [
366 'index' => 4,
367 'element' => 'address',
368 'attributes' => [
369 'autocomplete' => '',
370 'id' => '',
371 'class' => '',
372 'name' => 'address_1',
373 'data-type' => 'address-element',
374 ],
375 'settings' => [
376 'label' => __('Address', 'fluentform'),
377 'enable_g_autocomplete' => 'no',
378 'autocomplete_provider' => 'none',
379 'enable_auto_locate' => 'on_click',
380 'admin_field_label' => 'Address',
381 'field_order' => [
382 ['id' => 1, 'value' => 'address_line_1'],
383 ['id' => 2, 'value' => 'address_line_2'],
384 ['id' => 3, 'value' => 'city'],
385 ['id' => 4, 'value' => 'state'],
386 ['id' => 5, 'value' => 'zip'],
387 ['id' => 6, 'value' => 'country'],
388 ],
389 'conditional_logics' => [],
390 ],
391 'fields' => [
392 'address_line_1' => [
393 'element' => 'input_text',
394 'attributes' => [
395 'type' => 'text',
396 'name' => 'address_line_1',
397 'value' => '',
398 'id' => '',
399 'class' => '',
400 'placeholder' => __('Address Line 1', 'fluentform'),
401 ],
402 'settings' => [
403 'container_class' => '',
404 'label' => __('Address Line 1', 'fluentform'),
405 'label_placement' => '',
406 'label_placement_options' => [
407 [
408 'value' => '',
409 'label' => __('Default', 'fluentform'),
410 ],
411 [
412 'value' => 'top',
413 'label' => __('Top', 'fluentform'),
414 ],
415 [
416 'value' => 'right',
417 'label' => __('Right', 'fluentform'),
418 ],
419 [
420 'value' => 'bottom',
421 'label' => __('Bottom', 'fluentform'),
422 ],
423 [
424 'value' => 'left',
425 'label' => __('Left', 'fluentform'),
426 ],
427 [
428 'value' => 'hide_label',
429 'label' => __('Hidden', 'fluentform'),
430 ],
431 ],
432 'admin_field_label' => '',
433 'help_message' => '',
434 'visible' => true,
435 'validation_rules' => [
436 'required' => [
437 'value' => false,
438 'message' => $fluentformDefaultGlobalMessages['required'],
439 'global_message' => $fluentformDefaultGlobalMessages['required'],
440 'global' => true,
441 ],
442 ],
443 'conditional_logics' => [],
444 ],
445 'editor_options' => [
446 'template' => 'inputText',
447 ],
448 ],
449 'address_line_2' => [
450 'element' => 'input_text',
451 'attributes' => [
452 'type' => 'text',
453 'name' => 'address_line_2',
454 'value' => '',
455 'id' => '',
456 'class' => '',
457 'placeholder' => __('Address Line 2', 'fluentform'),
458 ],
459 'settings' => [
460 'container_class' => '',
461 'label' => __('Address Line 2', 'fluentform'),
462 'label_placement' => '',
463 'label_placement_options' => [
464 [
465 'value' => '',
466 'label' => __('Default', 'fluentform'),
467 ],
468 [
469 'value' => 'top',
470 'label' => __('Top', 'fluentform'),
471 ],
472 [
473 'value' => 'right',
474 'label' => __('Right', 'fluentform'),
475 ],
476 [
477 'value' => 'bottom',
478 'label' => __('Bottom', 'fluentform'),
479 ],
480 [
481 'value' => 'left',
482 'label' => __('Left', 'fluentform'),
483 ],
484 [
485 'value' => 'hide_label',
486 'label' => __('Hide Label', 'fluentform'),
487 ],
488 ],
489 'admin_field_label' => '',
490 'help_message' => '',
491 'visible' => true,
492 'validation_rules' => [
493 'required' => [
494 'value' => false,
495 'message' => $fluentformDefaultGlobalMessages['required'],
496 'global_message' => $fluentformDefaultGlobalMessages['required'],
497 'global' => true,
498 ],
499 ],
500 'conditional_logics' => [],
501 ],
502 'editor_options' => [
503 'template' => 'inputText',
504 ],
505 ],
506 'city' => [
507 'element' => 'input_text',
508 'attributes' => [
509 'type' => 'text',
510 'name' => 'city',
511 'value' => '',
512 'id' => '',
513 'class' => '',
514 'placeholder' => __('City', 'fluentform'),
515 ],
516 'settings' => [
517 'container_class' => '',
518 'label' => __('City', 'fluentform'),
519 'label_placement' => '',
520 'label_placement_options' => [
521 [
522 'value' => '',
523 'label' => __('Default', 'fluentform'),
524 ],
525 [
526 'value' => 'top',
527 'label' => __('Top', 'fluentform'),
528 ],
529 [
530 'value' => 'right',
531 'label' => __('Right', 'fluentform'),
532 ],
533 [
534 'value' => 'bottom',
535 'label' => __('Bottom', 'fluentform'),
536 ],
537 [
538 'value' => 'left',
539 'label' => __('Left', 'fluentform'),
540 ],
541 [
542 'value' => 'hide_label',
543 'label' => __('Hide Label', 'fluentform'),
544 ],
545 ],
546 'admin_field_label' => '',
547 'help_message' => '',
548 'error_message' => '',
549 'visible' => true,
550 'validation_rules' => [
551 'required' => [
552 'value' => false,
553 'message' => $fluentformDefaultGlobalMessages['required'],
554 'global_message' => $fluentformDefaultGlobalMessages['required'],
555 'global' => true,
556 ],
557 ],
558 'conditional_logics' => [],
559 ],
560 'editor_options' => [
561 'template' => 'inputText',
562 ],
563 ],
564 'state' => [
565 'element' => 'input_text',
566 'attributes' => [
567 'type' => 'text',
568 'name' => 'state',
569 'value' => '',
570 'id' => '',
571 'class' => '',
572 'placeholder' => __('State', 'fluentform'),
573 ],
574 'settings' => [
575 'container_class' => '',
576 'label' => __('State', 'fluentform'),
577 'label_placement' => '',
578 'label_placement_options' => [
579 [
580 'value' => '',
581 'label' => __('Default', 'fluentform'),
582 ],
583 [
584 'value' => 'top',
585 'label' => __('Top', 'fluentform'),
586 ],
587 [
588 'value' => 'right',
589 'label' => __('Right', 'fluentform'),
590 ],
591 [
592 'value' => 'bottom',
593 'label' => __('Bottom', 'fluentform'),
594 ],
595 [
596 'value' => 'left',
597 'label' => __('Left', 'fluentform'),
598 ],
599 [
600 'value' => 'hide_label',
601 'label' => __('Hide Label', 'fluentform'),
602 ],
603 ],
604 'admin_field_label' => '',
605 'help_message' => '',
606 'error_message' => '',
607 'visible' => true,
608 'validation_rules' => [
609 'required' => [
610 'value' => false,
611 'message' => $fluentformDefaultGlobalMessages['required'],
612 'global_message' => $fluentformDefaultGlobalMessages['required'],
613 'global' => true,
614 ],
615 ],
616 'conditional_logics' => [],
617 ],
618 'editor_options' => [
619 'template' => 'inputText',
620 ],
621 ],
622 'zip' => [
623 'element' => 'input_text',
624 'attributes' => [
625 'type' => 'text',
626 'name' => 'zip',
627 'value' => '',
628 'id' => '',
629 'class' => '',
630 'placeholder' => __('Zip', 'fluentform'),
631 'required' => false,
632 ],
633 'settings' => [
634 'container_class' => '',
635 'label' => __('Zip Code', 'fluentform'),
636 'label_placement' => '',
637 'label_placement_options' => [
638 [
639 'value' => '',
640 'label' => __('Default', 'fluentform'),
641 ],
642 [
643 'value' => 'top',
644 'label' => __('Top', 'fluentform'),
645 ],
646 [
647 'value' => 'right',
648 'label' => __('Right', 'fluentform'),
649 ],
650 [
651 'value' => 'bottom',
652 'label' => __('Bottom', 'fluentform'),
653 ],
654 [
655 'value' => 'left',
656 'label' => __('Left', 'fluentform'),
657 ],
658 [
659 'value' => 'hide_label',
660 'label' => __('Hide Label', 'fluentform'),
661 ],
662 ],
663 'admin_field_label' => '',
664 'help_message' => '',
665 'error_message' => '',
666 'visible' => true,
667 'validation_rules' => [
668 'required' => [
669 'value' => false,
670 'message' => $fluentformDefaultGlobalMessages['required'],
671 'global_message' => $fluentformDefaultGlobalMessages['required'],
672 'global' => true,
673 ],
674 ],
675 'conditional_logics' => [],
676 ],
677 'editor_options' => [
678 'template' => 'inputText',
679 ],
680 ],
681 'country' => [
682 'element' => 'select_country',
683 'attributes' => [
684 'name' => 'country',
685 'value' => '',
686 'id' => '',
687 'class' => '',
688 'placeholder' => __('Select Country', 'fluentform'),
689 'required' => false,
690 ],
691 'settings' => [
692 'container_class' => '',
693 'label' => __('Country', 'fluentform'),
694 'label_placement' => '',
695 'label_placement_options' => [
696 [
697 'value' => '',
698 'label' => __('Default', 'fluentform'),
699 ],
700 [
701 'value' => 'top',
702 'label' => __('Top', 'fluentform'),
703 ],
704 [
705 'value' => 'right',
706 'label' => __('Right', 'fluentform'),
707 ],
708 [
709 'value' => 'bottom',
710 'label' => __('Bottom', 'fluentform'),
711 ],
712 [
713 'value' => 'left',
714 'label' => __('Left', 'fluentform'),
715 ],
716 [
717 'value' => 'hide_label',
718 'label' => __('Hide Label', 'fluentform'),
719 ],
720 ],
721 'admin_field_label' => '',
722 'help_message' => '',
723 'error_message' => '',
724 'visible' => true,
725 'validation_rules' => [
726 'required' => [
727 'value' => false,
728 'message' => $fluentformDefaultGlobalMessages['required'],
729 'global_message' => $fluentformDefaultGlobalMessages['required'],
730 'global' => true,
731 ],
732 ],
733 'country_list' => [
734 'active_list' => 'all',
735 'visible_list' => [],
736 'hidden_list' => [],
737 ],
738 'conditional_logics' => [],
739 ],
740 'options' => [
741 'US' => 'US of America',
742 'UK' => 'United Kingdom',
743 ],
744 'editor_options' => [
745 'title' => __('Country List', 'fluentform'),
746 'element' => 'country-list',
747 'icon_class' => 'icon-text-width',
748 'template' => 'selectCountry',
749 ],
750 ],
751 ],
752 'editor_options' => [
753 'title' => __('Address Fields', 'fluentform'),
754 'element' => 'address-fields',
755 'icon_class' => 'ff-edit-address',
756 'template' => 'addressFields',
757 ],
758 ],
759 'input_number' => [
760 'index' => 6,
761 'element' => 'input_number',
762 'attributes' => [
763 'autocomplete' => '',
764 'type' => 'number',
765 'name' => 'numeric_field',
766 'value' => '',
767 'id' => '',
768 'class' => '',
769 'placeholder' => '',
770 ],
771 'settings' => [
772 'container_class' => '',
773 'label' => __('Numeric Field', 'fluentform'),
774 'admin_field_label' => '',
775 'label_placement' => '',
776 'help_message' => '',
777 'number_step' => '',
778 'prefix_label' => '',
779 'suffix_label' => '',
780 'numeric_formatter' => '',
781 'mobile_keyboard_type_number' => '',
782 'validation_rules' => [
783 'required' => [
784 'value' => false,
785 'message' => $fluentformDefaultGlobalMessages['required'],
786 'global_message' => $fluentformDefaultGlobalMessages['required'],
787 'global' => true,
788 ],
789 'numeric' => [
790 'value' => true,
791 'message' => $fluentformDefaultGlobalMessages['numeric'],
792 'global_message' => $fluentformDefaultGlobalMessages['numeric'],
793 'global' => true
794 ],
795 'min' => [
796 'value' => '',
797 'message' => $fluentformDefaultGlobalMessages['min'],
798 'global_message' => $fluentformDefaultGlobalMessages['min'],
799 'global' => true
800 ],
801 'max' => [
802 'value' => '',
803 'message' => $fluentformDefaultGlobalMessages['max'],
804 'global_message' => $fluentformDefaultGlobalMessages['max'],
805 'global' => true
806 ],
807 'digits' => [
808 'value' => '',
809 'message' => $fluentformDefaultGlobalMessages['digits'],
810 'global_message' => $fluentformDefaultGlobalMessages['digits'],
811 'global' => true
812 ],
813 ],
814 'conditional_logics' => [],
815 'calculation_settings' => [
816 'status' => false,
817 'formula' => '',
818 ],
819 ],
820 'editor_options' => [
821 'title' => __('Numeric Field', 'fluentform'),
822 'icon_class' => 'ff-edit-numeric',
823 'template' => 'inputText',
824 ],
825 ],
826 'select' => [
827 'index' => 7,
828 'element' => 'select',
829 'attributes' => [
830 'autocomplete' => '',
831 'name' => 'dropdown',
832 'value' => '',
833 'id' => '',
834 'class' => '',
835 ],
836 'settings' => [
837 'dynamic_default_value' => '',
838 'label' => __('Dropdown', 'fluentform'),
839 'admin_field_label' => '',
840 'help_message' => '',
841 'container_class' => '',
842 'label_placement' => '',
843 'placeholder' => '- Select -',
844 'advanced_options' => [
845 [
846 'label' => 'Option 1',
847 'value' => 'Option 1',
848 'calc_value' => '',
849 ],
850 [
851 'label' => 'Option 2',
852 'value' => 'Option 2',
853 'calc_value' => '',
854 ],
855 ],
856 'calc_value_status' => false,
857 'enable_image_input' => false,
858 'values_visible' => false,
859 'enable_option_groups' => 'no',
860 'enable_select_2' => 'no',
861 'validation_rules' => [
862 'required' => [
863 'value' => false,
864 'message' => $fluentformDefaultGlobalMessages['required'],
865 'global_message' => $fluentformDefaultGlobalMessages['required'],
866 'global' => true,
867 ],
868 ],
869 'conditional_logics' => [],
870 'randomize_options' => 'no',
871 ],
872 'editor_options' => [
873 'title' => __('Dropdown', 'fluentform'),
874 'icon_class' => 'ff-edit-dropdown',
875 'element' => 'select',
876 'template' => 'select',
877 ],
878 ],
879 'input_radio' => [
880 'index' => 8,
881 'element' => 'input_radio',
882 'attributes' => [
883 'type' => 'radio',
884 'name' => 'input_radio',
885 'value' => '',
886 ],
887 'settings' => [
888 'dynamic_default_value' => '',
889 'container_class' => '',
890 'label' => __('Radio Field', 'fluentform'),
891 'admin_field_label' => '',
892 'label_placement' => '',
893 'display_type' => '',
894 'help_message' => '',
895 'randomize_options' => 'no',
896 'advanced_options' => [
897 [
898 'label' => 'Yes',
899 'value' => 'yes',
900 'calc_value' => '',
901 'image' => '',
902 ],
903 [
904 'label' => 'No',
905 'value' => 'no',
906 'calc_value' => '',
907 'image' => '',
908 ],
909 ],
910 'calc_value_status' => false,
911 'enable_image_input' => false,
912 'values_visible' => false,
913 'randomize_options' => 'no',
914 'enable_other_option' => 'no',
915 'other_option_label' => __('Other', 'fluentform'),
916 'other_option_placeholder' => __('Please specify...', 'fluentform'),
917 'other_option_required_message' => __('Please specify a value for the selected "Other" option', 'fluentform'),
918 'validation_rules' => [
919 'required' => [
920 'value' => false,
921 'message' => $fluentformDefaultGlobalMessages['required'],
922 'global_message' => $fluentformDefaultGlobalMessages['required'],
923 'global' => true,
924 ],
925 ],
926 'conditional_logics' => [],
927 'layout_class' => '',
928 ],
929 'editor_options' => [
930 'title' => __('Radio Field', 'fluentform'),
931 'icon_class' => 'ff-edit-radio',
932 'element' => 'input-radio',
933 'template' => 'inputCheckable',
934 ],
935 ],
936 'input_checkbox' => [
937 'index' => 9,
938 'element' => 'input_checkbox',
939 'attributes' => [
940 'type' => 'checkbox',
941 'name' => 'checkbox',
942 'value' => [],
943 ],
944 'settings' => [
945 'dynamic_default_value' => '',
946 'container_class' => '',
947 'label' => __('Checkbox Field', 'fluentform'),
948 'admin_field_label' => '',
949 'label_placement' => '',
950 'display_type' => '',
951 'help_message' => '',
952 'advanced_options' => [
953 [
954 'label' => 'Item 1',
955 'value' => 'Item 1',
956 'calc_value' => '',
957 'image' => '',
958 ],
959 [
960 'label' => 'Item 2',
961 'value' => 'Item 2',
962 'calc_value' => '',
963 'image' => '',
964 ],
965 [
966 'label' => 'Item 3',
967 'value' => 'Item 3',
968 'calc_value' => '',
969 'image' => '',
970 ],
971 ],
972 'calc_value_status' => false,
973 'enable_image_input' => false,
974 'values_visible' => false,
975 'randomize_options' => 'no',
976 'enable_other_option' => 'no',
977 'other_option_label' => __('Other', 'fluentform'),
978 'other_option_placeholder' => __('Please specify...', 'fluentform'),
979 'other_option_required_message' => __('Please specify a value for the selected "Other" option', 'fluentform'),
980 'validation_rules' => [
981 'required' => [
982 'value' => false,
983 'message' => $fluentformDefaultGlobalMessages['required'],
984 'global_message' => $fluentformDefaultGlobalMessages['required'],
985 'global' => true,
986 ],
987 // Key order is the panel's layout order.
988 'max_selection' => [
989 'value' => '',
990 'message' => $fluentformDefaultGlobalMessages['max_selection'],
991 'global_message' => $fluentformDefaultGlobalMessages['max_selection'],
992 'global' => true,
993 ],
994 'min_selection' => [
995 'value' => '',
996 'message' => $fluentformDefaultGlobalMessages['min_selection'],
997 'global_message' => $fluentformDefaultGlobalMessages['min_selection'],
998 'global' => true,
999 ],
1000 ],
1001 'conditional_logics' => [],
1002 'layout_class' => '',
1003 ],
1004 'editor_options' => [
1005 'title' => __('Checkbox', 'fluentform'),
1006 'icon_class' => 'ff-edit-checkbox-1',
1007 'template' => 'inputCheckable',
1008 ],
1009 ],
1010 'multi_select' => [
1011 'index' => 10,
1012 'element' => 'select',
1013 'attributes' => [
1014 'autocomplete' => '',
1015 'name' => 'multi_select',
1016 'value' => [],
1017 'id' => '',
1018 'class' => '',
1019 'placeholder' => '',
1020 'multiple' => true,
1021 ],
1022 'settings' => [
1023 'dynamic_default_value' => '',
1024 'help_message' => '',
1025 'container_class' => '',
1026 'label' => __('Multiselect', 'fluentform'),
1027 'admin_field_label' => '',
1028 'label_placement' => '',
1029 'placeholder' => '',
1030 'max_selection' => '',
1031 'advanced_options' => [
1032 [
1033 'label' => 'Option 1',
1034 'value' => 'Option 1',
1035 'calc_value' => '',
1036 ],
1037 [
1038 'label' => 'Option 2',
1039 'value' => 'Option 2',
1040 'calc_value' => '',
1041 ],
1042 ],
1043 'calc_value_status' => false,
1044 'enable_image_input' => false,
1045 'enable_option_groups' => 'no',
1046 'randomize_options' => 'no',
1047 'validation_rules' => [
1048 'required' => [
1049 'value' => false,
1050 'message' => $fluentformDefaultGlobalMessages['required'],
1051 'global_message' => $fluentformDefaultGlobalMessages['required'],
1052 'global' => true,
1053 ],
1054 // settings.max_selection above stays as the legacy fallback;
1055 // only a rule can carry an editable error message.
1056 'max_selection' => [
1057 'value' => '',
1058 'message' => $fluentformDefaultGlobalMessages['max_selection'],
1059 'global_message' => $fluentformDefaultGlobalMessages['max_selection'],
1060 'global' => true,
1061 ],
1062 'min_selection' => [
1063 'value' => '',
1064 'message' => $fluentformDefaultGlobalMessages['min_selection'],
1065 'global_message' => $fluentformDefaultGlobalMessages['min_selection'],
1066 'global' => true,
1067 ],
1068 ],
1069 'conditional_logics' => [],
1070 ],
1071 'editor_options' => [
1072 'title' => __('Multiple Choice', 'fluentform'),
1073 'icon_class' => 'ff-edit-multiple-choice',
1074 'element' => 'select',
1075 'template' => 'select',
1076 ],
1077 ],
1078 'input_url' => [
1079 'index' => 11,
1080 'element' => 'input_url',
1081 'attributes' => [
1082 'autocomplete' => '',
1083 'type' => 'url',
1084 'name' => 'url',
1085 'value' => '',
1086 'class' => '',
1087 'placeholder' => '',
1088 ],
1089 'settings' => [
1090 'container_class' => '',
1091 'label' => __('URL', 'fluentform'),
1092 'admin_field_label' => '',
1093 'label_placement' => '',
1094 'help_message' => '',
1095 'prefix_label' => '',
1096 'suffix_label' => '',
1097 'validation_rules' => [
1098 'required' => [
1099 'value' => false,
1100 'message' => $fluentformDefaultGlobalMessages['required'],
1101 'global_message' => $fluentformDefaultGlobalMessages['required'],
1102 'global' => true,
1103 ],
1104 'url' => [
1105 'value' => true,
1106 'message' => $fluentformDefaultGlobalMessages['url'],
1107 'global_message' => $fluentformDefaultGlobalMessages['url'],
1108 'global' => true
1109 ],
1110 ],
1111 'conditional_logics' => [],
1112 ],
1113 'editor_options' => [
1114 'title' => __('Website URL', 'fluentform'),
1115 'icon_class' => 'ff-edit-website-url',
1116 'template' => 'inputText',
1117 ],
1118 ],
1119 'input_date' => [
1120 'index' => 13,
1121 'element' => 'input_date',
1122 'attributes' => [
1123 'autocomplete' => '',
1124 'type' => 'text',
1125 'name' => 'datetime',
1126 'value' => '',
1127 'id' => '',
1128 'class' => '',
1129 'placeholder' => '',
1130 ],
1131 'settings' => [
1132 'container_class' => '',
1133 'label' => __('Date / Time', 'fluentform'),
1134 'admin_field_label' => '',
1135 'label_placement' => '',
1136 'date_config' => '',
1137 'date_format' => 'd/m/Y',
1138 'help_message' => '',
1139 'is_time_enabled' => true,
1140 'validation_rules' => [
1141 'required' => [
1142 'value' => false,
1143 'message' => $fluentformDefaultGlobalMessages['required'],
1144 'global_message' => $fluentformDefaultGlobalMessages['required'],
1145 'global' => true,
1146 ],
1147 ],
1148 'conditional_logics' => [],
1149 ],
1150 'editor_options' => [
1151 'title' => __('Time & Date', 'fluentform'),
1152 'icon_class' => 'ff-edit-date',
1153 'template' => 'inputText',
1154 ],
1155 ],
1156 'input_image' => [
1157 'index' => 15,
1158 'element' => 'input_image',
1159 'attributes' => [
1160 'type' => 'file',
1161 'name' => 'image-upload',
1162 'value' => '',
1163 'id' => '',
1164 'class' => '',
1165 'accept' => 'image/*',
1166 ],
1167 'settings' => [
1168 'container_class' => '',
1169 'label' => __('Image Upload', 'fluentform'),
1170 'admin_field_label' => '',
1171 'label_placement' => '',
1172 'btn_text' => 'Choose File',
1173 'upload_file_location' => 'default',
1174 'file_location_type' => 'follow_global_settings',
1175 'help_message' => '',
1176 'upload_bttn_ui' => '',
1177 'enable_crop' => 'no',
1178 'crop_mode' => 'ratio',
1179 'crop_ratio' => 'free',
1180 'enforce_image_dimensions' => 'no',
1181 'crop_width' => '',
1182 'crop_height' => '',
1183 'validation_rules' => [
1184 'required' => [
1185 'value' => false,
1186 'message' => $fluentformDefaultGlobalMessages['required'],
1187 'global_message' => $fluentformDefaultGlobalMessages['required'],
1188 'global' => true,
1189 ],
1190 'max_file_size' => [
1191 'value' => 1048576,
1192 '_valueFrom' => 'MB',
1193 'message' => $fluentformDefaultGlobalMessages['max_file_size'],
1194 'global_message' => $fluentformDefaultGlobalMessages['max_file_size'],
1195 'global' => true
1196 ],
1197 'max_file_count' => [
1198 'value' => 1,
1199 'message' => $fluentformDefaultGlobalMessages['max_file_count'],
1200 'global_message' => $fluentformDefaultGlobalMessages['max_file_count'],
1201 'global' => true
1202 ],
1203 'allowed_image_types' => [
1204 'value' => [],
1205 'message' => $fluentformDefaultGlobalMessages['allowed_image_types'],
1206 'global_message' => $fluentformDefaultGlobalMessages['allowed_image_types'],
1207 'global' => true
1208 ],
1209 ],
1210 'conditional_logics' => [],
1211 ],
1212 'editor_options' => [
1213 'title' => __('Image Upload', 'fluentform'),
1214 'icon_class' => 'ff-edit-images',
1215 'template' => 'inputFile',
1216 ],
1217 ],
1218 'input_file' => [
1219 'index' => 16,
1220 'element' => 'input_file',
1221 'attributes' => [
1222 'type' => 'file',
1223 'name' => 'file-upload',
1224 'value' => '',
1225 'id' => '',
1226 'class' => '',
1227 ],
1228 'settings' => [
1229 'container_class' => '',
1230 'label' => __('File Upload', 'fluentform'),
1231 'admin_field_label' => '',
1232 'label_placement' => '',
1233 'btn_text' => 'Choose File',
1234 'help_message' => '',
1235 'upload_file_location' => 'default',
1236 'file_location_type' => 'follow_global_settings',
1237 'upload_bttn_ui' => '',
1238 'validation_rules' => [
1239 'required' => [
1240 'value' => false,
1241 'message' => $fluentformDefaultGlobalMessages['required'],
1242 'global_message' => $fluentformDefaultGlobalMessages['required'],
1243 'global' => true,
1244 ],
1245 'max_file_size' => [
1246 'value' => 1048576,
1247 '_valueFrom' => 'MB',
1248 'message' => $fluentformDefaultGlobalMessages['max_file_size'],
1249 'global_message' => $fluentformDefaultGlobalMessages['max_file_size'],
1250 'global' => true
1251 ],
1252 'max_file_count' => [
1253 'value' => 1,
1254 'message' => $fluentformDefaultGlobalMessages['max_file_count'],
1255 'global_message' => $fluentformDefaultGlobalMessages['max_file_count'],
1256 'global' => true
1257 ],
1258 'allowed_file_types' => [
1259 'value' => [],
1260 'message' => $fluentformDefaultGlobalMessages['allowed_image_types'],
1261 'global_message' => $fluentformDefaultGlobalMessages['allowed_image_types'],
1262 'global' => true
1263 ],
1264 ],
1265 'conditional_logics' => [],
1266 ],
1267 'editor_options' => [
1268 'title' => __('File Upload', 'fluentform'),
1269 'icon_class' => 'ff-edit-files',
1270 'template' => 'inputFile',
1271 ],
1272 ],
1273 'select_country' => [
1274 'index' => 5,
1275 'element' => 'select_country',
1276 'attributes' => [
1277 'name' => 'country-list',
1278 'value' => '',
1279 'id' => '',
1280 'class' => '',
1281 'placeholder' => __('Select Country', 'fluentform'),
1282 ],
1283 'settings' => [
1284 'container_class' => '',
1285 'label' => __('Country', 'fluentform'),
1286 'admin_field_label' => '',
1287 'label_placement' => '',
1288 'help_message' => '',
1289 'enable_select_2' => 'no',
1290 'validation_rules' => [
1291 'required' => [
1292 'value' => false,
1293 'message' => $fluentformDefaultGlobalMessages['required'],
1294 'global_message' => $fluentformDefaultGlobalMessages['required'],
1295 'global' => true,
1296 ],
1297 ],
1298 'country_list' => [
1299 'active_list' => 'all',
1300 'visible_list' => [],
1301 'hidden_list' => [],
1302 ],
1303 'conditional_logics' => [],
1304 ],
1305 'options' => [
1306 'US' => 'United States of America',
1307 ],
1308 'editor_options' => [
1309 'title' => __('Country List', 'fluentform'),
1310 'element' => 'country-list',
1311 'icon_class' => 'ff-edit-country',
1312 'template' => 'selectCountry',
1313 ],
1314 ],
1315 'custom_html' => [
1316 'index' => 17,
1317 'element' => 'custom_html',
1318 'attributes' => [],
1319 'settings' => [
1320 'html_codes' => '<p>Some description about this section</p>',
1321 'conditional_logics' => [],
1322 'container_class' => '',
1323 ],
1324 'editor_options' => [
1325 'title' => __('Custom HTML', 'fluentform'),
1326 'icon_class' => 'ff-edit-html',
1327 'template' => 'customHTML',
1328 ],
1329 ],
1330 ],
1331 'advanced' => [
1332 'ratings' => [
1333 'index' => 8,
1334 'element' => 'ratings',
1335 'attributes' => [
1336 'class' => '',
1337 'value' => 0,
1338 'name' => 'ratings',
1339 ],
1340 'settings' => [
1341 'label' => __('Ratings', 'fluentform'),
1342 'show_text' => 'no',
1343 'icon_source' => 'preset',
1344 'icon_type' => 'star',
1345 'custom_icon_svg' => '',
1346 'inactive_color' => \FluentForm\App\Services\FormBuilder\RatingIcon::DEFAULT_INACTIVE_COLOR,
1347 'active_color' => \FluentForm\App\Services\FormBuilder\RatingIcon::DEFAULT_ACTIVE_COLOR,
1348 'help_message' => '',
1349 'label_placement' => '',
1350 'admin_field_label' => '',
1351 'container_class' => '',
1352 'conditional_logics' => [],
1353 'validation_rules' => [
1354 'required' => [
1355 'value' => false,
1356 'message' => $fluentformDefaultGlobalMessages['required'],
1357 'global_message' => $fluentformDefaultGlobalMessages['required'],
1358 'global' => true,
1359 ],
1360 ],
1361 ],
1362 'options' => [
1363 '1' => __('Nice', 'fluentform'),
1364 '2' => __('Good', 'fluentform'),
1365 '3' => __('Very Good', 'fluentform'),
1366 '4' => __('Awesome', 'fluentform'),
1367 '5' => __('Amazing', 'fluentform'),
1368 ],
1369 'editor_options' => [
1370 'title' => __('Ratings', 'fluentform'),
1371 'icon_class' => 'ff-edit-rating',
1372 'template' => 'ratings',
1373 ],
1374 ],
1375 'input_hidden' => [
1376 'index' => 0,
1377 'element' => 'input_hidden',
1378 'attributes' => [
1379 'type' => 'hidden',
1380 'name' => 'hidden',
1381 'value' => '',
1382 ],
1383 'settings' => [
1384 'admin_field_label' => '',
1385 ],
1386 'editor_options' => [
1387 'title' => __('Hidden Field', 'fluentform'),
1388 'icon_class' => 'ff-edit-hidden-field',
1389 'template' => 'inputHidden',
1390 ],
1391 ],
1392 'tabular_grid' => [
1393 'index' => 9,
1394 'element' => 'tabular_grid',
1395 'attributes' => [
1396 'name' => 'tabular_grid',
1397 'data-type' => 'tabular-element',
1398 ],
1399 'settings' => [
1400 'tabular_field_type' => 'checkbox',
1401 'container_class' => '',
1402 'label' => __('Checkbox Grid', 'fluentform'),
1403 'admin_field_label' => '',
1404 'label_placement' => '',
1405 'help_message' => '',
1406 'validation_rules' => [
1407 'required' => [
1408 'value' => false,
1409 'message' => $fluentformDefaultGlobalMessages['required'],
1410 'global_message' => $fluentformDefaultGlobalMessages['required'],
1411 'global' => true,
1412 'per_row' => false,
1413 ],
1414 ],
1415 'conditional_logics' => [],
1416 'grid_columns' => [
1417 'Column-1' => 'Column 1',
1418 ],
1419 'grid_rows' => [
1420 'Row-1' => 'Row 1',
1421 ],
1422 'selected_grids' => [],
1423 ],
1424 'editor_options' => [
1425 'title' => __('Checkable Grid', 'fluentform'),
1426 'icon_class' => 'ff-edit-checkable-grid',
1427 'template' => 'checkableGrids',
1428 ],
1429 ],
1430 'section_break' => [
1431 'index' => 1,
1432 'element' => 'section_break',
1433 'attributes' => [
1434 'id' => '',
1435 'class' => '',
1436 ],
1437 'settings' => [
1438 'label' => __('Section Break', 'fluentform'),
1439 'description' => __('Some description about this section', 'fluentform'),
1440 'align' => 'left',
1441 'conditional_logics' => [],
1442 ],
1443 'editor_options' => [
1444 'title' => __('Section Break', 'fluentform'),
1445 'icon_class' => 'ff-edit-section-break',
1446 'template' => 'sectionBreak',
1447 ],
1448 ],
1449 'input_password' => [
1450 'index' => 11,
1451 'element' => 'input_password',
1452 'attributes' => [
1453 'autocomplete' => '',
1454 'type' => 'password',
1455 'name' => 'password',
1456 'value' => '',
1457 'id' => '',
1458 'class' => '',
1459 'placeholder' => '',
1460 ],
1461 'settings' => [
1462 'container_class' => '',
1463 'label' => __('Password', 'fluentform'),
1464 'admin_field_label' => '',
1465 'label_placement' => '',
1466 'help_message' => '',
1467 'prefix_label' => '',
1468 'suffix_label' => '',
1469 'validation_rules' => [
1470 'required' => [
1471 'value' => false,
1472 'message' => $fluentformDefaultGlobalMessages['required'],
1473 'global_message' => $fluentformDefaultGlobalMessages['required'],
1474 'global' => true,
1475 ],
1476 ],
1477 'conditional_logics' => [],
1478 ],
1479 'editor_options' => [
1480 'title' => __('Password', 'fluentform'),
1481 'icon_class' => 'ff-edit-password',
1482 'template' => 'inputText',
1483 ],
1484 ],
1485 'form_step' => [
1486 'index' => 7,
1487 'element' => 'form_step',
1488 'attributes' => [
1489 'id' => '',
1490 'class' => '',
1491 ],
1492 'settings' => [
1493 'prev_btn' => [
1494 'type' => 'default',
1495 'text' => __('Previous', 'fluentform'),
1496 'img_url' => '',
1497 ],
1498 'next_btn' => [
1499 'type' => 'default',
1500 'text' => __('Next', 'fluentform'),
1501 'img_url' => '',
1502 ],
1503 ],
1504 'editor_options' => [
1505 'title' => __('Form Step', 'fluentform'),
1506 'icon_class' => 'ff-edit-step',
1507 'template' => 'formStep',
1508 ],
1509 ],
1510 'terms_and_condition' => [
1511 'index' => 5,
1512 'element' => 'terms_and_condition',
1513 'attributes' => [
1514 'type' => 'checkbox',
1515 'name' => 'terms-n-condition',
1516 'value' => false,
1517 'class' => '',
1518 ],
1519 'settings' => [
1520 '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>',
1521 'has_checkbox' => true,
1522 'admin_field_label' => __('Terms and Conditions', 'fluentform'),
1523 'container_class' => '',
1524 'validation_rules' => [
1525 'required' => [
1526 'value' => false,
1527 'message' => $fluentformDefaultGlobalMessages['required'],
1528 'global_message' => $fluentformDefaultGlobalMessages['required'],
1529 'global' => true,
1530 ],
1531 ],
1532 'conditional_logics' => [],
1533 ],
1534 'editor_options' => [
1535 'title' => __('Terms & Conditions', 'fluentform'),
1536 'icon_class' => 'ff-edit-terms-condition',
1537 'template' => 'termsCheckbox',
1538 ],
1539 ],
1540 'gdpr_agreement' => [
1541 'index' => 10,
1542 'element' => 'gdpr_agreement',
1543 'attributes' => [
1544 'type' => 'checkbox',
1545 'name' => 'gdpr-agreement',
1546 'value' => false,
1547 'class' => 'ff_gdpr_field',
1548 ],
1549 'settings' => [
1550 'label' => __('GDPR Agreement', 'fluentform'),
1551 'tnc_html' => __('I consent to have this website store my submitted information so they can respond to my inquiry', 'fluentform'),
1552 'admin_field_label' => __('GDPR Agreement', 'fluentform'),
1553 'has_checkbox' => true,
1554 'container_class' => '',
1555 'validation_rules' => [
1556 'required' => [
1557 'value' => true,
1558 'message' => $fluentformDefaultGlobalMessages['required'],
1559 'global_message' => $fluentformDefaultGlobalMessages['required'],
1560 'global' => true,
1561 ],
1562 ],
1563 'required_field_message' => '',
1564 'conditional_logics' => [],
1565 ],
1566 'editor_options' => [
1567 'title' => __('GDPR Agreement', 'fluentform'),
1568 'icon_class' => 'ff-edit-gdpr',
1569 'template' => 'termsCheckbox',
1570 ],
1571 ],
1572 'recaptcha' => [
1573 'index' => 2,
1574 'element' => 'recaptcha',
1575 'attributes' => ['name' => 'g-recaptcha-response'],
1576 'settings' => [
1577 'label' => '',
1578 'label_placement' => '',
1579 'validation_rules' => [],
1580 'render_recaptcha_v3_badge' => false
1581 ],
1582 'editor_options' => [
1583 'title' => __('reCaptcha', 'fluentform'),
1584 'icon_class' => 'ff-edit-recaptha',
1585 'why_disabled_modal' => 'recaptcha',
1586 'template' => 'recaptcha',
1587 ],
1588 ],
1589 'hcaptcha' => [
1590 'index' => 3,
1591 'element' => 'hcaptcha',
1592 'attributes' => ['name' => 'h-captcha-response'],
1593 'settings' => [
1594 'label' => '',
1595 'label_placement' => '',
1596 'validation_rules' => [],
1597 ],
1598 'editor_options' => [
1599 'title' => __('hCaptcha', 'fluentform'),
1600 'icon_class' => 'ff-edit-recaptha',
1601 'why_disabled_modal' => 'hcaptcha',
1602 'template' => 'hcaptcha',
1603 ],
1604 ],
1605 'turnstile' => [
1606 'index' => 3,
1607 'element' => 'turnstile',
1608 'attributes' => ['name' => 'cf-turnstile-response'],
1609 'settings' => [
1610 'label' => '',
1611 'label_placement' => '',
1612 'validation_rules' => []
1613 ],
1614 'editor_options' => [
1615 'title' => __('Turnstile', 'fluentform'),
1616 'icon_class' => 'ff-edit-recaptha',
1617 'why_disabled_modal' => 'turnstile',
1618 'template' => 'turnstile',
1619 ],
1620 ],
1621 'shortcode' => [
1622 'index' => 4,
1623 'element' => 'shortcode',
1624 'attributes' => [
1625 'id' => '',
1626 'class' => '',
1627 ],
1628 'settings' => [
1629 'shortcode' => '[your_shortcode_here]',
1630 'conditional_logics' => [],
1631 ],
1632 'editor_options' => [
1633 'title' => __('Shortcode', 'fluentform'),
1634 'icon_class' => 'ff-edit-shortcode',
1635 'template' => 'shortcode',
1636 ],
1637 ],
1638 'action_hook' => [
1639 'index' => 6,
1640 'element' => 'action_hook',
1641 'attributes' => [
1642 'id' => '',
1643 'class' => '',
1644 ],
1645 'settings' => [
1646 'hook_name' => 'YOUR_CUSTOM_HOOK_NAME',
1647 'conditional_logics' => [],
1648 ],
1649 'editor_options' => [
1650 'title' => __('Action Hook', 'fluentform'),
1651 'icon_class' => 'ff-edit-action-hook',
1652 'template' => 'actionHook',
1653 ],
1654 ],
1655 ],
1656 'container' => [
1657 'container_1_col' => [
1658 'index' => 1,
1659 'element' => 'container',
1660 'attributes' => [],
1661 'settings' => [
1662 'container_class' => '',
1663 'conditional_logics' => [],
1664 'is_width_auto_calc' => true,
1665 ],
1666 'columns' => [
1667 ['width' => 100, 'left' => '', 'fields' => []],
1668 ],
1669 'editor_options' => [
1670 'title' => __('One Column Container', 'fluentform'),
1671 'icon_class' => 'dashicons dashicons-align-center',
1672 ],
1673 ],
1674 'container_2_col' => [
1675 'index' => 1,
1676 'element' => 'container',
1677 'attributes' => [],
1678 'settings' => [
1679 'container_class' => '',
1680 'conditional_logics' => [],
1681 'container_width' => '',
1682 'is_width_auto_calc' => true,
1683 ],
1684 'columns' => [
1685 ['width' => 50, 'fields' => []],
1686 ['width' => 50, 'fields' => []],
1687 ],
1688 'editor_options' => [
1689 'title' => __('Two Column Container', 'fluentform'),
1690 'icon_class' => 'ff-edit-column-2',
1691 ],
1692 ],
1693 'container_3_col' => [
1694 'index' => 2,
1695 'element' => 'container',
1696 'attributes' => [],
1697 'settings' => [
1698 'container_class' => '',
1699 'conditional_logics' => [],
1700 'container_width' => '',
1701 'is_width_auto_calc' => true,
1702 ],
1703 'columns' => [
1704 ['width' => 33.33, 'fields' => []],
1705 ['width' => 33.33, 'fields' => []],
1706 ['width' => 33.33, 'fields' => []],
1707 ],
1708 'editor_options' => [
1709 'title' => __('Three Column Container', 'fluentform'),
1710 'icon_class' => 'ff-edit-three-column',
1711 ],
1712 ],
1713 'container_4_col' => [
1714 'index' => 3,
1715 'element' => 'container',
1716 'attributes' => [],
1717 'settings' => [
1718 'container_class' => '',
1719 'conditional_logics' => [],
1720 'container_width' => '',
1721 'is_width_auto_calc' => true,
1722 ],
1723 'columns' => [
1724 ['width' => 25, 'fields' => []],
1725 ['width' => 25, 'fields' => []],
1726 ['width' => 25, 'fields' => []],
1727 ['width' => 25, 'fields' => []],
1728 ],
1729 'editor_options' => [
1730 'title' => __('Four Column Container', 'fluentform'),
1731 'icon_class' => 'ff-edit-three-column',
1732 ],
1733 ],
1734 'container_5_col' => [
1735 'index' => 5,
1736 'element' => 'container',
1737 'attributes' => [],
1738 'settings' => [
1739 'container_class' => '',
1740 'conditional_logics' => [],
1741 'container_width' => '',
1742 'is_width_auto_calc' => true,
1743 ],
1744 'columns' => [
1745 ['width' => 20, 'fields' => []],
1746 ['width' => 20, 'fields' => []],
1747 ['width' => 20, 'fields' => []],
1748 ['width' => 20, 'fields' => []],
1749 ['width' => 20, 'fields' => []],
1750 ],
1751 'editor_options' => [
1752 'title' => __('Five Column Container', 'fluentform'),
1753 'icon_class' => 'ff-edit-three-column',
1754 ],
1755 ],
1756 'container_6_col' => [
1757 'index' => 6,
1758 'element' => 'container',
1759 'attributes' => [],
1760 'settings' => [
1761 'container_class' => '',
1762 'conditional_logics' => [],
1763 'container_width' => '',
1764 'is_width_auto_calc' => true,
1765 ],
1766 'columns' => [
1767 ['width' => 16.67, 'fields' => []],
1768 ['width' => 16.67, 'fields' => []],
1769 ['width' => 16.67, 'fields' => []],
1770 ['width' => 16.67, 'fields' => []],
1771 ['width' => 16.67, 'fields' => []],
1772 ['width' => 16.67, 'fields' => []],
1773 ],
1774 'editor_options' => [
1775 'title' => __('Six Column Container', 'fluentform'),
1776 'icon_class' => 'ff-edit-three-column',
1777 ],
1778 ],
1779 ],
1780 ];
1781
1782 if (! defined('FLUENTFORMPRO')) {
1783 $fluentformDefaultElements['general']['phone'] = [
1784 'index' => 17,
1785 'element' => 'phone',
1786 'attributes' => [],
1787 'settings' => [],
1788 'editor_options' => [
1789 'title' => __('Phone', 'fluentform'),
1790 'icon_class' => 'el-icon-phone-outline',
1791 'template' => 'inputText',
1792 ],
1793 ];
1794 $fluentformDefaultElements['advanced']['net_promoter_score'] = [
1795 'index' => 14,
1796 'element' => 'net_promoter_score',
1797 'attributes' => [],
1798 'settings' => [],
1799 'options' => [],
1800 'editor_options' => [
1801 'title' => __('Net Promoter Score', 'fluentform'),
1802 'icon_class' => 'ff-edit-rating',
1803 'template' => 'net_promoter',
1804 ],
1805 ];
1806 $fluentformDefaultElements['advanced']['quiz_score'] = [
1807 'index' => 19,
1808 'element' => 'quiz_score',
1809 'attributes' => [],
1810 'settings' => [],
1811 'options' => [],
1812 'editor_options' => [
1813 'title' => __('Quiz Score', 'fluentform'),
1814 'icon_class' => 'el-icon-postcard',
1815 'template' => 'inputHidden',
1816 ],
1817 ];
1818 $fluentformDefaultElements['advanced']['dynamic_field'] = [
1819 'index' => 19,
1820 'element' => 'dynamic_field',
1821 'attributes' => [],
1822 'settings' => [],
1823 'options' => [],
1824 'editor_options' => [
1825 'title' => __('Dynamic Field', 'fluentform'),
1826 'icon_class' => 'ff-edit-repeat',
1827 'template' => 'inputHidden',
1828 ],
1829 ];
1830 $fluentformDefaultElements['advanced']['cpt_selection'] = [
1831 'index' => 18,
1832 'element' => 'cpt_selection',
1833 'attributes' => [],
1834 'settings' => [],
1835 'options' => [],
1836 'editor_options' => [
1837 'title' => __('Post/CPT Selection', 'fluentform'),
1838 'icon_class' => 'ff-edit-dropdown',
1839 'element' => 'select',
1840 'template' => 'select',
1841 ],
1842 ];
1843 $fluentformDefaultElements['advanced']['save_progress_button'] = [
1844 'index' => 20,
1845 'element' => 'save_progress_button',
1846 'attributes' => [],
1847 'settings' => [],
1848 'options' => [],
1849 'editor_options' => [
1850 'title' => __('Save & Resume', 'fluentform'),
1851 'icon_class' => 'dashicons dashicons-arrow-right-alt',
1852 'template' => 'customButton',
1853 ],
1854 ];
1855 $fluentformDefaultElements['advanced']['rich_text_input'] = [
1856 'index' => 19,
1857 'element' => 'rich_text_input',
1858 'attributes' => [],
1859 'settings' => [],
1860 'options' => [],
1861 'editor_options' => [
1862 'title' => __('Rich Text Input', 'fluentform'),
1863 'icon_class' => 'ff-edit-textarea',
1864 'template' => 'inputTextarea',
1865 ],
1866 ];
1867 $fluentformDefaultElements['advanced']['chained_select'] = [
1868 'index' => 15,
1869 'element' => 'chained_select',
1870 'attributes' => [],
1871 'settings' => [],
1872 'options' => [],
1873 'editor_options' => [
1874 'title' => __('Chained Select', 'fluentform'),
1875 'icon_class' => 'ff-edit-link',
1876 'template' => 'chainedSelect',
1877 ],
1878 ];
1879 $fluentformDefaultElements['advanced']['repeater_field'] = [
1880 'index' => 17,
1881 'element' => 'repeater_field',
1882 'attributes' => [],
1883 'settings' => [],
1884 'options' => [],
1885 'editor_options' => [
1886 'title' => __('Repeat Field', 'fluentform'),
1887 'icon_class' => 'ff-edit-repeat',
1888 'template' => 'fieldsRepeatSettings',
1889 ],
1890 ];
1891 $fluentformDefaultElements['advanced']['rangeslider'] = [
1892 'index' => 13,
1893 'element' => 'rangeslider',
1894 'attributes' => [],
1895 'settings' => [],
1896 'editor_options' => [
1897 'title' => __('Range Slider', 'fluentform'),
1898 'icon_class' => 'dashicons dashicons-leftright',
1899 'template' => 'inputSlider',
1900 ],
1901 ];
1902 $fluentformDefaultElements['advanced']['input_ranking'] = [
1903 'index' => 21,
1904 'element' => 'input_ranking',
1905 'attributes' => [],
1906 'settings' => [],
1907 'options' => [],
1908 'editor_options' => [
1909 'title' => __('Ranking Field', 'fluentform'),
1910 'icon_class' => 'dashicons dashicons-sort',
1911 'template' => 'rankingField',
1912 ],
1913 ];
1914 $fluentformDefaultElements['advanced']['color-picker'] = [
1915 'index' => 16,
1916 'element' => 'color-picker',
1917 'attributes' => [],
1918 'settings' => [],
1919 'editor_options' => [
1920 'title' => __('Color Picker', 'fluentform'),
1921 'icon_class' => 'ff-edit-tint',
1922 'template' => 'inputText',
1923 ],
1924 ];
1925 $fluentformDefaultElements['container']['accordion'] = [
1926 'index' => 18,
1927 'element' => 'accordion',
1928 'attributes' => [],
1929 'settings' => [],
1930 'options' => [],
1931 'editor_options' => [
1932 'title' => __('Accordion/Tab', 'fluentform'),
1933 'icon_class' => 'ff-edit-section-break',
1934 'template' => 'CustomEditorField',
1935 ],
1936 ];
1937 }
1938
1939 if (defined('FLUENTFORMPRO')) {
1940 $fluentformDefaultElements['general']['address']['fields']['latitude'] = [
1941 'element' => 'input_hidden',
1942 'attributes' => [
1943 'type' => 'hidden',
1944 'name' => 'latitude',
1945 'value' => '',
1946 ],
1947 'settings' => [
1948 'label' => 'Latitude',
1949 'visible' => false,
1950 ],
1951 ];
1952 $fluentformDefaultElements['general']['address']['fields']['longitude'] = [
1953 'element' => 'input_hidden',
1954 'attributes' => [
1955 'type' => 'hidden',
1956 'name' => 'longitude',
1957 'value' => '',
1958 ],
1959 'settings' => [
1960 'label' => 'Longitude',
1961 'visible' => false,
1962 ],
1963 ];
1964 }
1965
1966 return $fluentformDefaultElements;
1967