PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 3.6.61
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v3.6.61
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.61, at app/Services/FormBuilder/DefaultElements.php

1,441 lines 53.6 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 ),
551 'editor_options' => array(
552 'title' => __('Dropdown', 'fluentform'),
553 'icon_class' => 'ff-edit-dropdown',
554 'element' => 'select',
555 'template' => 'select'
556 )
557 ),
558 'input_radio' => array(
559 'index' => 8,
560 'element' => 'input_radio',
561 'attributes' => array(
562 'type' => 'radio',
563 'name' => 'input_radio',
564 'value' => '',
565 ),
566 'settings' => array(
567 'dynamic_default_value' => '',
568 'container_class' => '',
569 'label' => __('Radio Field', 'fluentform'),
570 'admin_field_label' => '',
571 'label_placement' => '',
572 'display_type' => '',
573 'help_message' => '',
574 'advanced_options' => array(
575 [
576 'label' => 'Yes',
577 'value' => 'yes',
578 'calc_value' => '',
579 'image' => ''
580 ],
581 [
582 'label' => 'No',
583 'value' => 'no',
584 'calc_value' => '',
585 'image' => ''
586 ]
587 ),
588 'calc_value_status' => false,
589 'enable_image_input' => false,
590 'validation_rules' => array(
591 'required' => array(
592 'value' => false,
593 'message' => __('This field is required', 'fluentform'),
594 ),
595 ),
596 'conditional_logics' => array(),
597 'layout_class' => ''
598 ),
599 'editor_options' => array(
600 'title' => __('Radio Field', 'fluentform'),
601 'icon_class' => 'ff-edit-radio',
602 'element' => 'input-radio',
603 'template' => 'inputCheckable'
604 ),
605 ),
606 'input_checkbox' => array(
607 'index' => 9,
608 'element' => 'input_checkbox',
609 'attributes' => array(
610 'type' => 'checkbox',
611 'name' => 'checkbox',
612 'value' => array(),
613 ),
614 'settings' => array(
615 'dynamic_default_value' => '',
616 'container_class' => '',
617 'label' => __('Checkbox Field', 'fluentform'),
618 'admin_field_label' => '',
619 'label_placement' => '',
620 'display_type' => '',
621 'help_message' => '',
622
623 'advanced_options' => array(
624 [
625 'label' => 'Item 1',
626 'value' => 'Item 1',
627 'calc_value' => '',
628 'image' => ''
629 ],
630 [
631 'label' => 'Item 2',
632 'value' => 'Item 2',
633 'calc_value' => '',
634 'image' => ''
635 ],
636 [
637 'label' => 'Item 3',
638 'value' => 'Item 3',
639 'calc_value' => '',
640 'image' => ''
641 ]
642 ),
643 'calc_value_status' => false,
644 'enable_image_input' => false,
645
646 'validation_rules' => array(
647 'required' => array(
648 'value' => false,
649 'message' => __('This field is required', 'fluentform'),
650 ),
651 ),
652 'conditional_logics' => array(),
653 'layout_class' => ''
654 ),
655 'editor_options' => array(
656 'title' => __('Check Box', 'fluentform'),
657 'icon_class' => 'ff-edit-checkbox-1',
658 'template' => 'inputCheckable'
659 ),
660 ),
661 'multi_select' => array(
662 'index' => 10,
663 'element' => 'select',
664 'attributes' => array(
665 'name' => 'multi_select',
666 'value' => array(),
667 'id' => '',
668 'class' => '',
669 'placeholder' => '',
670 'multiple' => true,
671 ),
672 'settings' => array(
673 'dynamic_default_value' => '',
674 'help_message' => '',
675 'container_class' => '',
676 'label' => __('Multiselect', 'fluentform'),
677 'admin_field_label' => '',
678 'label_placement' => '',
679 'placeholder' => '',
680
681 'advanced_options' => array(
682 [
683 'label' => 'Option 1',
684 'value' => 'Option 1',
685 'calc_value' => ''
686 ],
687 [
688 'label' => 'Option 2',
689 'value' => 'Option 2',
690 'calc_value' => ''
691 ]
692 ),
693 'calc_value_status' => false,
694 'enable_image_input' => false,
695
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 'validation_rules' => array(
885 'required' => array(
886 'value' => false,
887 'message' => __('This field is required', 'fluentform'),
888 ),
889 ),
890 'country_list' => array(
891 'active_list' => 'all',
892 'visible_list' => array(),
893 'hidden_list' => array(),
894 ),
895 'conditional_logics' => array(),
896 ),
897 'options' => array(
898 'US' => 'United States of America',
899 ),
900 'editor_options' => array(
901 'title' => __('Country List', 'fluentform'),
902 'element' => 'country-list',
903 'icon_class' => 'ff-edit-country',
904 'template' => 'selectCountry'
905 ),
906 ),
907 'custom_html' => array(
908 'index' => 20,
909 'element' => 'custom_html',
910 'attributes' => array(),
911 'settings' => array(
912 'html_codes' => '<p>Some description about this section</p>',
913 'conditional_logics' => array(),
914 'container_class' => ''
915 ),
916 'editor_options' => array(
917 'title' => __('Custom HTML', 'fluentform'),
918 'icon_class' => 'ff-edit-html',
919 'template' => 'customHTML',
920 )
921 ),
922 ),
923 'advanced' => array(
924 'ratings' => array(
925 'index' => 8,
926 'element' => 'ratings',
927 'attributes' => array(
928 'class' => '',
929 'value' => 0,
930 'name' => 'ratings',
931 ),
932 'settings' => array(
933 'label' => __('Ratings', 'fluentform'),
934 'show_text' => 'no',
935 'help_message' => '',
936 'label_placement' => '',
937 'admin_field_label' => '',
938 'container_class' => '',
939 'conditional_logics' => array(),
940 'validation_rules' => array(
941 'required' => array(
942 'value' => false,
943 'message' => __('This field is required', 'fluentform'),
944 ),
945 ),
946 ),
947 'options' => array(
948 '1' => __('Nice', 'fluentform'),
949 '2' => __('Good', 'fluentform'),
950 '3' => __('Very Good', 'fluentform'),
951 '4' => __('Awesome', 'fluentform'),
952 '5' => __('Amazing', 'fluentform'),
953 ),
954 'editor_options' => array(
955 'title' => __('Ratings', 'fluentform'),
956 'icon_class' => 'ff-edit-rating',
957 'template' => 'ratings',
958 ),
959 ),
960 'input_hidden' => array(
961 'index' => 0,
962 'element' => 'input_hidden',
963 'attributes' => array(
964 'type' => 'hidden',
965 'name' => 'hidden',
966 'value' => '',
967 ),
968 'settings' => array(
969 'admin_field_label' => ''
970 ),
971 'editor_options' => array(
972 'title' => __('Hidden Field', 'fluentform'),
973 'icon_class' => 'ff-edit-hidden-field',
974 'template' => 'inputHidden',
975 ),
976 ),
977 'tabular_grid' => array(
978 'index' => 9,
979 'element' => 'tabular_grid',
980 'attributes' => array(
981 'name' => 'tabular_grid',
982 'data-type' => 'tabular-element'
983 ),
984 'settings' => array(
985 'tabular_field_type' => 'checkbox',
986 'container_class' => '',
987 'label' => __('Checkbox Grid', 'fluentform'),
988 'admin_field_label' => '',
989 'label_placement' => '',
990 'help_message' => '',
991 'validation_rules' => array(
992 'required' => array(
993 'value' => false,
994 'message' => __('This field is required', 'fluentform'),
995 'per_row' => false,
996 ),
997 ),
998 'conditional_logics' => array(),
999 'grid_columns' => array(
1000 'Column-1' => 'Column 1'
1001 ),
1002 'grid_rows' => array(
1003 'Row-1' => 'Row 1'
1004 ),
1005 'selected_grids' => array()
1006 ),
1007 'editor_options' => array(
1008 'title' => __('Checkable Grid', 'fluentform'),
1009 'icon_class' => 'ff-edit-checkable-grid',
1010 'template' => 'checkableGrids'
1011 ),
1012 ),
1013 'section_break' => array(
1014 'index' => 1,
1015 'element' => 'section_break',
1016 'attributes' => array(
1017 'id' => '',
1018 'class' => '',
1019 ),
1020 'settings' => array(
1021 'label' => __('Section Break', 'fluentform'),
1022 'description' => __('Some description about this section', 'fluentform'),
1023 'align' => 'left',
1024 'conditional_logics' => array(),
1025 ),
1026 'editor_options' => array(
1027 'title' => __('Section Break', 'fluentform'),
1028 'icon_class' => 'ff-edit-section-break',
1029 'template' => 'sectionBreak',
1030 ),
1031 ),
1032 'input_password' => array(
1033 'index' => 12,
1034 'element' => 'input_password',
1035 'attributes' => array(
1036 'type' => 'password',
1037 'name' => 'password',
1038 'value' => '',
1039 'id' => '',
1040 'class' => '',
1041 'placeholder' => '',
1042 ),
1043 'settings' => array(
1044 'container_class' => '',
1045 'label' => __('Password', 'fluentform'),
1046 'admin_field_label' => '',
1047 'label_placement' => '',
1048 'help_message' => '',
1049 'validation_rules' => array(
1050 'required' => array(
1051 'value' => false,
1052 'message' => __('This field is required', 'fluentform'),
1053 ),
1054 ),
1055 'conditional_logics' => array(),
1056 ),
1057 'editor_options' => array(
1058 'title' => __('Password Field', 'fluentform'),
1059 'icon_class' => 'ff-edit-password',
1060 'template' => 'inputText'
1061 ),
1062 ),
1063 'form_step' => array(
1064 'index' => 7,
1065 'element' => 'form_step',
1066 'attributes' => [
1067 'id' => '',
1068 'class' => '',
1069 ],
1070 'settings' => [
1071 'prev_btn' => [
1072 'type' => 'default',
1073 'text' => __('Previous', 'fluentform'),
1074 'img_url' => '',
1075 ],
1076 'next_btn' => [
1077 'type' => 'default',
1078 'text' => __('Next', 'fluentform'),
1079 'img_url' => '',
1080 ],
1081 ],
1082 'editor_options' => [
1083 'title' => __('Form Step', 'fluentform'),
1084 'icon_class' => 'ff-edit-step',
1085 'template' => 'formStep',
1086 ],
1087 ),
1088 'terms_and_condition' => array(
1089 'index' => 5,
1090 'element' => 'terms_and_condition',
1091 'attributes' => array(
1092 'type' => 'checkbox',
1093 'name' => 'terms-n-condition',
1094 'value' => false,
1095 'class' => '',
1096 ),
1097 'settings' => array(
1098 '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>',
1099 'has_checkbox' => true,
1100 'admin_field_label' => __('Terms and Conditions', 'fluentform'),
1101 'container_class' => '',
1102 'validation_rules' => array(
1103 'required' => array(
1104 'value' => false,
1105 'message' => __('This field is required', 'fluentform'),
1106 ),
1107 ),
1108 'conditional_logics' => array(),
1109 ),
1110 'editor_options' => array(
1111 'title' => __('Terms & Conditions', 'fluentform'),
1112 'icon_class' => 'ff-edit-terms-condition',
1113 'template' => 'termsCheckbox'
1114 ),
1115 ),
1116 'gdpr_agreement' => array(
1117 'index' => 10,
1118 'element' => 'gdpr_agreement',
1119 'attributes' => array(
1120 'type' => 'checkbox',
1121 'name' => 'gdpr-agreement',
1122 'value' => false,
1123 'class' => 'ff_gdpr_field',
1124 ),
1125 'settings' => array(
1126 'label' => __('GDPR Agreement', 'fluentform'),
1127 'tnc_html' => __('I consent to having this website store my submitted information so they can respond to my inquiry', 'fluentform'),
1128 'admin_field_label' => __('GDPR Agreement', 'fluentform'),
1129 'has_checkbox' => true,
1130 'container_class' => '',
1131 'validation_rules' => array(
1132 'required' => array(
1133 'value' => true,
1134 'message' => __('This field is required', 'fluentform'),
1135 ),
1136 ),
1137 'required_field_message' => '',
1138 'conditional_logics' => array(),
1139 ),
1140 'editor_options' => array(
1141 'title' => __('GDPR Agreement', 'fluentform'),
1142 'icon_class' => 'ff-edit-gdpr',
1143 'template' => 'termsCheckbox'
1144 ),
1145 ),
1146 'recaptcha' => array(
1147 'index' => 2,
1148 'element' => 'recaptcha',
1149 'attributes' => array('name' => 'recaptcha'),
1150 'settings' => array(
1151 'label' => '',
1152 'label_placement' => '',
1153 'validation_rules' => array(),
1154 ),
1155 'editor_options' => array(
1156 'title' => __('reCaptcha', 'fluentform'),
1157 'icon_class' => 'ff-edit-recaptha',
1158 'why_disabled_modal' => 'recaptcha',
1159 'template' => 'recaptcha',
1160 ),
1161 ),
1162 'shortcode' => array(
1163 'index' => 4,
1164 'element' => 'shortcode',
1165 'attributes' => array(
1166 'id' => '',
1167 'class' => ''
1168 ),
1169 'settings' => array(
1170 'shortcode' => '[your_shorcode_here]',
1171 'conditional_logics' => array(),
1172 ),
1173 'editor_options' => array(
1174 'title' => __('Shortcode', 'fluentform'),
1175 'icon_class' => 'ff-edit-shortcode',
1176 'template' => 'shortcode',
1177 )
1178 ),
1179 'action_hook' => array(
1180 'index' => 6,
1181 'element' => 'action_hook',
1182 'attributes' => array(
1183 'id' => '',
1184 'class' => ''
1185 ),
1186 'settings' => array(
1187 'hook_name' => 'YOUR_CUSTOM_HOOK_NAME',
1188 'conditional_logics' => array(),
1189 ),
1190 'editor_options' => array(
1191 'title' => __('Action Hook', 'fluentform'),
1192 'icon_class' => 'ff-edit-action-hook',
1193 'template' => 'actionHook'
1194 )
1195 ),
1196 ),
1197 'container' => array(
1198 'container_1_col' => array(
1199 'index' => 1,
1200 'element' => 'container',
1201 'attributes' => array(),
1202 'settings' => array(
1203 'container_class' => '',
1204 'conditional_logics' => array()
1205 ),
1206 'columns' => array(
1207 array('fields' => array())
1208 ),
1209 'editor_options' =>
1210 array(
1211 'title' => __('One Column Container', 'fluentform'),
1212 'icon_class' => 'dashicons dashicons-align-center',
1213 ),
1214 ),
1215 'container_2_col' => array(
1216 'index' => 1,
1217 'element' => 'container',
1218 'attributes' => array(),
1219 'settings' => array(
1220 'container_class' => '',
1221 'conditional_logics' => array()
1222 ),
1223 'columns' => array(
1224 array('fields' => array()),
1225 array('fields' => array()),
1226 ),
1227 'editor_options' =>
1228 array(
1229 'title' => __('Two Column Container', 'fluentform'),
1230 'icon_class' => 'ff-edit-column-2',
1231 ),
1232 ),
1233 'container_3_col' => array(
1234 'index' => 2,
1235 'element' => 'container',
1236 'attributes' => array(),
1237 'settings' => array(
1238 'container_class' => '',
1239 'conditional_logics' => array()
1240 ),
1241 'columns' => array(
1242 array('fields' => array()),
1243 array('fields' => array()),
1244 array('fields' => array()),
1245 ),
1246 'editor_options' => array(
1247 'title' => __('Three Column Container', 'fluentform'),
1248 'icon_class' => 'ff-edit-three-column',
1249 ),
1250 ),
1251 'container_4_col' => array(
1252 'index' => 3,
1253 'element' => 'container',
1254 'attributes' => array(),
1255 'settings' => array(
1256 'container_class' => '',
1257 'conditional_logics' => array()
1258 ),
1259 'columns' => array(
1260 array('fields' => array()),
1261 array('fields' => array()),
1262 array('fields' => array()),
1263 array('fields' => array()),
1264 ),
1265 'editor_options' => array(
1266 'title' => __('Four Column Container', 'fluentform'),
1267 'icon_class' => 'ff-edit-three-column',
1268 ),
1269 ),
1270 'container_5_col' => array(
1271 'index' => 5,
1272 'element' => 'container',
1273 'attributes' => array(),
1274 'settings' => array(
1275 'container_class' => '',
1276 'conditional_logics' => array()
1277 ),
1278 'columns' => array(
1279 array('fields' => array()),
1280 array('fields' => array()),
1281 array('fields' => array()),
1282 array('fields' => array()),
1283 array('fields' => array()),
1284 ),
1285 'editor_options' => array(
1286 'title' => __('Five Column Container', 'fluentform'),
1287 'icon_class' => 'ff-edit-three-column',
1288 ),
1289 ),
1290 'container_6_col' => array(
1291 'index' => 6,
1292 'element' => 'container',
1293 'attributes' => array(),
1294 'settings' => array(
1295 'container_class' => '',
1296 'conditional_logics' => array()
1297 ),
1298 'columns' => array(
1299 array('fields' => array()),
1300 array('fields' => array()),
1301 array('fields' => array()),
1302 array('fields' => array()),
1303 array('fields' => array()),
1304 array('fields' => array()),
1305 ),
1306 'editor_options' => array(
1307 'title' => __('Six Column Container', 'fluentform'),
1308 'icon_class' => 'ff-edit-three-column',
1309 ),
1310 )
1311 )
1312 );
1313
1314
1315 if (!defined('FLUENTFORMPRO')) {
1316 $defaultElements['general']['phone'] = [
1317 'index' => 15,
1318 'element' => 'phone',
1319 'attributes' => [],
1320 'settings' => [],
1321 'editor_options' => [
1322 'title' => 'Phone Field',
1323 'icon_class' => 'el-icon-phone-outline',
1324 'template' => 'inputText'
1325 ],
1326 ];
1327
1328 $defaultElements['advanced']['net_promoter_score'] = [
1329 'index' => 19,
1330 'element' => 'net_promoter_score',
1331 'attributes' => array(),
1332 'settings' => array(),
1333 'options' => array(),
1334 'editor_options' => array(
1335 'title' => 'Net Promoter Score',
1336 'icon_class' => 'ff-edit-rating',
1337 'template' => 'net_promoter',
1338 )
1339 ];
1340
1341 $defaultElements['advanced']['repeater_field'] = [
1342 'index' => 19,
1343 'element' => 'repeater_field',
1344 'attributes' => array(),
1345 'settings' => array(),
1346 'options' => array(),
1347 'editor_options' => array(
1348 'title' => 'Repeat Field',
1349 'icon_class' => 'ff-edit-repeat',
1350 'template' => 'fieldsRepeatSettings'
1351 )
1352 ];
1353
1354 $defaultElements['advanced']['custom_submit_button'] = [
1355 'index' => 15,
1356 'element' => 'custom_submit_button',
1357 'attributes' => [],
1358 'settings' => [],
1359 'editor_options' => [
1360 'title' => 'Custom Submit Button',
1361 'icon_class' => 'dashicons dashicons-arrow-right-alt',
1362 'template' => 'customButton'
1363 ],
1364 ];
1365
1366 $defaultElements['advanced']['rangeslider'] = [
1367 'index' => 15,
1368 'element' => 'rangeslider',
1369 'attributes' => [],
1370 'settings' => [],
1371 'editor_options' => [
1372 'title' => 'Range Slider',
1373 'icon_class' => 'dashicons dashicons-leftright',
1374 'template' => 'inputSlider'
1375 ],
1376 ];
1377
1378
1379 $defaultElements['advanced']['color-picker'] = [
1380 'index' => 15,
1381 'element' => 'color-picker',
1382 'attributes' => [],
1383 'settings' => [],
1384 'editor_options' => [
1385 'title' => 'Color Picker',
1386 'icon_class' => 'ff-edit-tint',
1387 'template' => 'inputText'
1388 ],
1389 ];
1390
1391 $defaultElements['payments'] = array(
1392 'multi_payment_component' => [
1393 'index' => 6,
1394 'element' => 'multi_payment_component',
1395 'attributes' => [],
1396 'settings' => [],
1397 'editor_options' => array(
1398 'title' => __('Payment Field', 'fluentform'),
1399 'icon_class' => 'ff-edit-shopping-cart',
1400 'element' => 'input-radio',
1401 'template' => 'inputMultiPayment'
1402 ),
1403 ],
1404 'custom_payment_component' => [
1405 'index' => 6,
1406 'element' => 'custom_payment_component',
1407 'attributes' => [],
1408 'settings' => [],
1409 'editor_options' => array(
1410 'title' => __('Custom Payment Amount', 'fluentform'),
1411 'icon_class' => 'ff-edit-keyboard-o',
1412 'template' => 'inputText'
1413 )
1414 ],
1415 'item_quantity_component' => [
1416 'index' => 6,
1417 'element' => 'item_quantity_component',
1418 'attributes' => [],
1419 'settings' => [],
1420 'editor_options' => array(
1421 'title' => __('Item Quantity', 'fluentform'),
1422 'icon_class' => 'ff-edit-keyboard-o',
1423 'template' => 'inputText'
1424 ),
1425 ],
1426 'payment_method' => [
1427 'index' => 6,
1428 'element' => 'payment_method',
1429 'attributes' => [],
1430 'settings' => [],
1431 'editor_options' => array(
1432 'title' => 'Payment Method Field',
1433 'icon_class' => 'ff-edit-credit-card',
1434 'template' => 'inputPaymentMethods'
1435 ),
1436 ]
1437 );
1438 }
1439
1440
1441 return $defaultElements;