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

1,439 lines 53.5 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 'validation_rules' => array(
481 'required' => array(
482 'value' => false,
483 'message' => __('This field is required', 'fluentform'),
484 ),
485 'numeric' => array(
486 'value' => true,
487 'message' => __('This field must contain numeric value', 'fluentform'),
488 ),
489 'min' => array(
490 'value' => '',
491 'message' => __('Minimum value is ', 'fluentform'),
492 ),
493 'max' => array(
494 'value' => '',
495 'message' => __('Maximum value is ', 'fluentform'),
496 ),
497 ),
498 'conditional_logics' => array(),
499 'calculation_settings' => array(
500 'status' => false,
501 'formula' => ''
502 ),
503 ),
504 'editor_options' => array(
505 'title' => __('Numeric Field', 'fluentform'),
506 'icon_class' => 'ff-edit-numeric',
507 'template' => 'inputText'
508 ),
509 ),
510 'select' => array(
511 'index' => 7,
512 'element' => 'select',
513 'attributes' => array(
514 'name' => 'dropdown',
515 'value' => '',
516 'id' => '',
517 'class' => '',
518 ),
519 'settings' => array(
520 'label' => __('Dropdown', 'fluentform'),
521 'admin_field_label' => '',
522 'help_message' => '',
523 'container_class' => '',
524 'label_placement' => '',
525 'placeholder' => '- Select -',
526 'advanced_options' => array(
527 [
528 'label' => 'Option 1',
529 'value' => 'Option 1',
530 'calc_value' => ''
531 ],
532 [
533 'label' => 'Option 2',
534 'value' => 'Option 2',
535 'calc_value' => ''
536 ]
537 ),
538 'calc_value_status' => false,
539 'enable_image_input' => false,
540 'enable_select_2' => 'no',
541 'validation_rules' => array(
542 'required' => array(
543 'value' => false,
544 'message' => __('This field is required', 'fluentform'),
545 ),
546 ),
547 'conditional_logics' => array(),
548 ),
549 'editor_options' => array(
550 'title' => __('Dropdown', 'fluentform'),
551 'icon_class' => 'ff-edit-dropdown',
552 'element' => 'select',
553 'template' => 'select'
554 )
555 ),
556 'input_radio' => array(
557 'index' => 8,
558 'element' => 'input_radio',
559 'attributes' => array(
560 'type' => 'radio',
561 'name' => 'input_radio',
562 'value' => '',
563 ),
564 'settings' => array(
565 'dynamic_default_value' => '',
566 'container_class' => '',
567 'label' => __('Radio Field', 'fluentform'),
568 'admin_field_label' => '',
569 'label_placement' => '',
570 'display_type' => '',
571 'help_message' => '',
572 'advanced_options' => array(
573 [
574 'label' => 'Yes',
575 'value' => 'yes',
576 'calc_value' => '',
577 'image' => ''
578 ],
579 [
580 'label' => 'No',
581 'value' => 'no',
582 'calc_value' => '',
583 'image' => ''
584 ]
585 ),
586 'calc_value_status' => false,
587 'enable_image_input' => false,
588 'validation_rules' => array(
589 'required' => array(
590 'value' => false,
591 'message' => __('This field is required', 'fluentform'),
592 ),
593 ),
594 'conditional_logics' => array(),
595 'layout_class' => ''
596 ),
597 'editor_options' => array(
598 'title' => __('Radio Field', 'fluentform'),
599 'icon_class' => 'ff-edit-radio',
600 'element' => 'input-radio',
601 'template' => 'inputCheckable'
602 ),
603 ),
604 'input_checkbox' => array(
605 'index' => 9,
606 'element' => 'input_checkbox',
607 'attributes' => array(
608 'type' => 'checkbox',
609 'name' => 'checkbox',
610 'value' => array(),
611 ),
612 'settings' => array(
613 'dynamic_default_value' => '',
614 'container_class' => '',
615 'label' => __('Checkbox Field', 'fluentform'),
616 'admin_field_label' => '',
617 'label_placement' => '',
618 'display_type' => '',
619 'help_message' => '',
620
621 'advanced_options' => array(
622 [
623 'label' => 'Item 1',
624 'value' => 'Item 1',
625 'calc_value' => '',
626 'image' => ''
627 ],
628 [
629 'label' => 'Item 2',
630 'value' => 'Item 2',
631 'calc_value' => '',
632 'image' => ''
633 ],
634 [
635 'label' => 'Item 3',
636 'value' => 'Item 3',
637 'calc_value' => '',
638 'image' => ''
639 ]
640 ),
641 'calc_value_status' => false,
642 'enable_image_input' => false,
643
644 'validation_rules' => array(
645 'required' => array(
646 'value' => false,
647 'message' => __('This field is required', 'fluentform'),
648 ),
649 ),
650 'conditional_logics' => array(),
651 'layout_class' => ''
652 ),
653 'editor_options' => array(
654 'title' => __('Check Box', 'fluentform'),
655 'icon_class' => 'ff-edit-checkbox-1',
656 'template' => 'inputCheckable'
657 ),
658 ),
659 'multi_select' => array(
660 'index' => 10,
661 'element' => 'select',
662 'attributes' => array(
663 'name' => 'multi_select',
664 'value' => array(),
665 'id' => '',
666 'class' => '',
667 'placeholder' => '',
668 'multiple' => true,
669 ),
670 'settings' => array(
671 'dynamic_default_value' => '',
672 'help_message' => '',
673 'container_class' => '',
674 'label' => __('Multiselect', 'fluentform'),
675 'admin_field_label' => '',
676 'label_placement' => '',
677 'placeholder' => '',
678
679 'advanced_options' => array(
680 [
681 'label' => 'Option 1',
682 'value' => 'Option 1',
683 'calc_value' => ''
684 ],
685 [
686 'label' => 'Option 2',
687 'value' => 'Option 2',
688 'calc_value' => ''
689 ]
690 ),
691 'calc_value_status' => false,
692 'enable_image_input' => false,
693
694 'validation_rules' => array(
695 'required' => array(
696 'value' => false,
697 'message' => __('This field is required', 'fluentform'),
698 ),
699 ),
700 'conditional_logics' => array(),
701 ),
702 'editor_options' => array(
703 'title' => __('Multiple Choice', 'fluentform'),
704 'icon_class' => 'ff-edit-multiple-choice',
705 'element' => 'select',
706 'template' => 'select'
707 )
708 ),
709 'input_url' => array(
710 'index' => 11,
711 'element' => 'input_url',
712 'attributes' => array(
713 'type' => 'url',
714 'name' => 'url',
715 'value' => '',
716 'class' => '',
717 'placeholder' => '',
718 ),
719 'settings' => array(
720 'container_class' => '',
721 'label' => __('URL', 'fluentform'),
722 'admin_field_label' => '',
723 'label_placement' => '',
724 'help_message' => '',
725 'validation_rules' => array(
726 'required' => array(
727 'value' => false,
728 'message' => __('This field is required', 'fluentform'),
729 ),
730 'url' => array(
731 'value' => true,
732 'message' => __('This field must contain a valid url', 'fluentform'),
733 ),
734 ),
735 'conditional_logics' => array(),
736 ),
737 'editor_options' => array(
738 'title' => __('Website URL', 'fluentform'),
739 'icon_class' => 'ff-edit-website-url',
740 'template' => 'inputText'
741 )
742 ),
743 'input_date' => array(
744 'index' => 13,
745 'element' => 'input_date',
746 'attributes' => array(
747 'type' => 'text',
748 'name' => 'datetime',
749 'value' => '',
750 'id' => '',
751 'class' => '',
752 'placeholder' => '',
753 ),
754 'settings' => array(
755 'container_class' => '',
756 'label' => __('Date / Time', 'fluentform'),
757 'admin_field_label' => '',
758 'label_placement' => '',
759 'date_config' => '',
760 'date_format' => 'd/m/Y',
761 'help_message' => '',
762 'is_time_enabled' => true,
763 'validation_rules' => array(
764 'required' => array(
765 'value' => false,
766 'message' => __('This field is required', 'fluentform'),
767 )
768 ),
769 'conditional_logics' => array(),
770 ),
771 'editor_options' => array(
772 'title' => __('Time & Date', 'fluentform'),
773 'icon_class' => 'ff-edit-date',
774 'template' => 'inputText'
775 ),
776 ),
777 'input_image' => array(
778 'index' => 15,
779 'element' => 'input_image',
780 'attributes' => array(
781 'type' => 'file',
782 'name' => 'image-upload',
783 'value' => '',
784 'id' => '',
785 'class' => '',
786 'accept' => 'image/*',
787 ),
788 'settings' => array(
789 'container_class' => '',
790 'label' => __('Image Upload', 'fluentform'),
791 'admin_field_label' => '',
792 'label_placement' => '',
793 'btn_text' => 'Choose File',
794 'help_message' => '',
795 'validation_rules' => array(
796 'required' => array(
797 'value' => false,
798 'message' => __('This field is required', 'fluentform'),
799 ),
800 'max_file_size' => array(
801 'value' => 1048576,
802 '_valueFrom' => 'MB',
803 'message' => __('Maximum file size limit is 1MB', 'fluentform')
804 ),
805 'max_file_count' => array(
806 'value' => 1,
807 'message' => __('You can upload maximum 1 image', 'fluentform')
808 ),
809 'allowed_image_types' => array(
810 'value' => array(),
811 'message' => __('Allowed image types does not match', 'fluentform')
812 )
813 ),
814 'conditional_logics' => array(),
815 ),
816 'editor_options' => array(
817 'title' => __('Image Upload', 'fluentform'),
818 'icon_class' => 'ff-edit-images',
819 'template' => 'inputFile'
820 ),
821 ),
822 'input_file' => array(
823 'index' => 16,
824 'element' => 'input_file',
825 'attributes' => array(
826 'type' => 'file',
827 'name' => 'file-upload',
828 'value' => '',
829 'id' => '',
830 'class' => '',
831 ),
832 'settings' => array(
833 'container_class' => '',
834 'label' => __('File Upload', 'fluentform'),
835 'admin_field_label' => '',
836 'label_placement' => '',
837 'btn_text' => 'Choose File',
838 'help_message' => '',
839 'validation_rules' => array(
840 'required' => array(
841 'value' => false,
842 'message' => __('This field is required', 'fluentform'),
843 ),
844 'max_file_size' => array(
845 'value' => 1048576,
846 '_valueFrom' => 'MB',
847 'message' => __('Maximum file size limit is 1MB', 'fluentform')
848 ),
849 'max_file_count' => array(
850 'value' => 1,
851 'message' => __('You can upload maximum 1 file', 'fluentform')
852 ),
853 'allowed_file_types' => array(
854 'value' => array(),
855 'message' => __('Invalid file type', 'fluentform')
856 )
857 ),
858 'conditional_logics' => array(),
859 ),
860 'editor_options' => array(
861 'title' => __('File Upload', 'fluentform'),
862 'icon_class' => 'ff-edit-files',
863 'template' => 'inputFile'
864 ),
865 ),
866 'select_country' => array(
867 'index' => 5,
868 'element' => 'select_country',
869 'attributes' => array(
870 'name' => 'country-list',
871 'value' => '',
872 'id' => '',
873 'class' => '',
874 'placeholder' => __('Select Country', 'fluentform'),
875 ),
876 'settings' => array(
877 'container_class' => '',
878 'label' => __('Country', 'fluentform'),
879 'admin_field_label' => '',
880 'label_placement' => '',
881 'help_message' => '',
882 'validation_rules' => array(
883 'required' => array(
884 'value' => false,
885 'message' => __('This field is required', 'fluentform'),
886 ),
887 ),
888 'country_list' => array(
889 'active_list' => 'all',
890 'visible_list' => array(),
891 'hidden_list' => array(),
892 ),
893 'conditional_logics' => array(),
894 ),
895 'options' => array(
896 'US' => 'United States of America',
897 ),
898 'editor_options' => array(
899 'title' => __('Country List', 'fluentform'),
900 'element' => 'country-list',
901 'icon_class' => 'ff-edit-country',
902 'template' => 'selectCountry'
903 ),
904 ),
905 'custom_html' => array(
906 'index' => 20,
907 'element' => 'custom_html',
908 'attributes' => array(),
909 'settings' => array(
910 'html_codes' => '<p>Some description about this section</p>',
911 'conditional_logics' => array(),
912 'container_class' => ''
913 ),
914 'editor_options' => array(
915 'title' => __('Custom HTML', 'fluentform'),
916 'icon_class' => 'ff-edit-html',
917 'template' => 'customHTML',
918 )
919 ),
920 ),
921 'advanced' => array(
922 'ratings' => array(
923 'index' => 8,
924 'element' => 'ratings',
925 'attributes' => array(
926 'class' => '',
927 'value' => 0,
928 'name' => 'ratings',
929 ),
930 'settings' => array(
931 'label' => __('Ratings', 'fluentform'),
932 'show_text' => 'no',
933 'help_message' => '',
934 'label_placement' => '',
935 'admin_field_label' => '',
936 'container_class' => '',
937 'conditional_logics' => array(),
938 'validation_rules' => array(
939 'required' => array(
940 'value' => false,
941 'message' => __('This field is required', 'fluentform'),
942 ),
943 ),
944 ),
945 'options' => array(
946 '1' => __('Nice', 'fluentform'),
947 '2' => __('Good', 'fluentform'),
948 '3' => __('Very Good', 'fluentform'),
949 '4' => __('Awesome', 'fluentform'),
950 '5' => __('Amazing', 'fluentform'),
951 ),
952 'editor_options' => array(
953 'title' => __('Ratings', 'fluentform'),
954 'icon_class' => 'ff-edit-rating',
955 'template' => 'ratings',
956 ),
957 ),
958 'input_hidden' => array(
959 'index' => 0,
960 'element' => 'input_hidden',
961 'attributes' => array(
962 'type' => 'hidden',
963 'name' => 'hidden',
964 'value' => '',
965 ),
966 'settings' => array(
967 'admin_field_label' => ''
968 ),
969 'editor_options' => array(
970 'title' => __('Hidden Field', 'fluentform'),
971 'icon_class' => 'ff-edit-hidden-field',
972 'template' => 'inputHidden',
973 ),
974 ),
975 'tabular_grid' => array(
976 'index' => 9,
977 'element' => 'tabular_grid',
978 'attributes' => array(
979 'name' => 'tabular_grid',
980 'data-type' => 'tabular-element'
981 ),
982 'settings' => array(
983 'tabular_field_type' => 'checkbox',
984 'container_class' => '',
985 'label' => __('Checkbox Grid', 'fluentform'),
986 'admin_field_label' => '',
987 'label_placement' => '',
988 'help_message' => '',
989 'validation_rules' => array(
990 'required' => array(
991 'value' => false,
992 'message' => __('This field is required', 'fluentform'),
993 'per_row' => false,
994 ),
995 ),
996 'conditional_logics' => array(),
997 'grid_columns' => array(
998 'Column-1' => 'Column 1'
999 ),
1000 'grid_rows' => array(
1001 'Row-1' => 'Row 1'
1002 ),
1003 'selected_grids' => array()
1004 ),
1005 'editor_options' => array(
1006 'title' => __('Checkable Grid', 'fluentform'),
1007 'icon_class' => 'ff-edit-checkable-grid',
1008 'template' => 'checkableGrids'
1009 ),
1010 ),
1011 'section_break' => array(
1012 'index' => 1,
1013 'element' => 'section_break',
1014 'attributes' => array(
1015 'id' => '',
1016 'class' => '',
1017 ),
1018 'settings' => array(
1019 'label' => __('Section Break', 'fluentform'),
1020 'description' => __('Some description about this section', 'fluentform'),
1021 'align' => 'left',
1022 'conditional_logics' => array(),
1023 ),
1024 'editor_options' => array(
1025 'title' => __('Section Break', 'fluentform'),
1026 'icon_class' => 'ff-edit-section-break',
1027 'template' => 'sectionBreak',
1028 ),
1029 ),
1030 'input_password' => array(
1031 'index' => 12,
1032 'element' => 'input_password',
1033 'attributes' => array(
1034 'type' => 'password',
1035 'name' => 'password',
1036 'value' => '',
1037 'id' => '',
1038 'class' => '',
1039 'placeholder' => '',
1040 ),
1041 'settings' => array(
1042 'container_class' => '',
1043 'label' => __('Password', 'fluentform'),
1044 'admin_field_label' => '',
1045 'label_placement' => '',
1046 'help_message' => '',
1047 'validation_rules' => array(
1048 'required' => array(
1049 'value' => false,
1050 'message' => __('This field is required', 'fluentform'),
1051 ),
1052 ),
1053 'conditional_logics' => array(),
1054 ),
1055 'editor_options' => array(
1056 'title' => __('Password Field', 'fluentform'),
1057 'icon_class' => 'ff-edit-password',
1058 'template' => 'inputText'
1059 ),
1060 ),
1061 'form_step' => array(
1062 'index' => 7,
1063 'element' => 'form_step',
1064 'attributes' => [
1065 'id' => '',
1066 'class' => '',
1067 ],
1068 'settings' => [
1069 'prev_btn' => [
1070 'type' => 'default',
1071 'text' => __('Previous', 'fluentform'),
1072 'img_url' => '',
1073 ],
1074 'next_btn' => [
1075 'type' => 'default',
1076 'text' => __('Next', 'fluentform'),
1077 'img_url' => '',
1078 ],
1079 ],
1080 'editor_options' => [
1081 'title' => __('Form Step', 'fluentform'),
1082 'icon_class' => 'ff-edit-step',
1083 'template' => 'formStep',
1084 ],
1085 ),
1086 'terms_and_condition' => array(
1087 'index' => 5,
1088 'element' => 'terms_and_condition',
1089 'attributes' => array(
1090 'type' => 'checkbox',
1091 'name' => 'terms-n-condition',
1092 'value' => false,
1093 'class' => '',
1094 ),
1095 'settings' => array(
1096 '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>',
1097 'has_checkbox' => true,
1098 'admin_field_label' => __('Terms and Conditions', 'fluentform'),
1099 'container_class' => '',
1100 'validation_rules' => array(
1101 'required' => array(
1102 'value' => false,
1103 'message' => __('This field is required', 'fluentform'),
1104 ),
1105 ),
1106 'conditional_logics' => array(),
1107 ),
1108 'editor_options' => array(
1109 'title' => __('Terms & Conditions', 'fluentform'),
1110 'icon_class' => 'ff-edit-terms-condition',
1111 'template' => 'termsCheckbox'
1112 ),
1113 ),
1114 'gdpr_agreement' => array(
1115 'index' => 10,
1116 'element' => 'gdpr_agreement',
1117 'attributes' => array(
1118 'type' => 'checkbox',
1119 'name' => 'gdpr-agreement',
1120 'value' => false,
1121 'class' => 'ff_gdpr_field',
1122 ),
1123 'settings' => array(
1124 'label' => __('GDPR Agreement', 'fluentform'),
1125 'tnc_html' => __('I consent to having this website store my submitted information so they can respond to my inquiry', 'fluentform'),
1126 'admin_field_label' => __('GDPR Agreement', 'fluentform'),
1127 'has_checkbox' => true,
1128 'container_class' => '',
1129 'validation_rules' => array(
1130 'required' => array(
1131 'value' => true,
1132 'message' => __('This field is required', 'fluentform'),
1133 ),
1134 ),
1135 'required_field_message' => '',
1136 'conditional_logics' => array(),
1137 ),
1138 'editor_options' => array(
1139 'title' => __('GDPR Agreement', 'fluentform'),
1140 'icon_class' => 'ff-edit-gdpr',
1141 'template' => 'termsCheckbox'
1142 ),
1143 ),
1144 'recaptcha' => array(
1145 'index' => 2,
1146 'element' => 'recaptcha',
1147 'attributes' => array('name' => 'recaptcha'),
1148 'settings' => array(
1149 'label' => '',
1150 'label_placement' => '',
1151 'validation_rules' => array(),
1152 ),
1153 'editor_options' => array(
1154 'title' => __('reCaptcha', 'fluentform'),
1155 'icon_class' => 'ff-edit-recaptha',
1156 'why_disabled_modal' => 'recaptcha',
1157 'template' => 'recaptcha',
1158 ),
1159 ),
1160 'shortcode' => array(
1161 'index' => 4,
1162 'element' => 'shortcode',
1163 'attributes' => array(
1164 'id' => '',
1165 'class' => ''
1166 ),
1167 'settings' => array(
1168 'shortcode' => '[your_shorcode_here]',
1169 'conditional_logics' => array(),
1170 ),
1171 'editor_options' => array(
1172 'title' => __('Shortcode', 'fluentform'),
1173 'icon_class' => 'ff-edit-shortcode',
1174 'template' => 'shortcode',
1175 )
1176 ),
1177 'action_hook' => array(
1178 'index' => 6,
1179 'element' => 'action_hook',
1180 'attributes' => array(
1181 'id' => '',
1182 'class' => ''
1183 ),
1184 'settings' => array(
1185 'hook_name' => 'YOUR_CUSTOM_HOOK_NAME',
1186 'conditional_logics' => array(),
1187 ),
1188 'editor_options' => array(
1189 'title' => __('Action Hook', 'fluentform'),
1190 'icon_class' => 'ff-edit-action-hook',
1191 'template' => 'actionHook'
1192 )
1193 ),
1194 ),
1195 'container' => array(
1196 'container_1_col' => array(
1197 'index' => 1,
1198 'element' => 'container',
1199 'attributes' => array(),
1200 'settings' => array(
1201 'container_class' => '',
1202 'conditional_logics' => array()
1203 ),
1204 'columns' => array(
1205 array('fields' => array())
1206 ),
1207 'editor_options' =>
1208 array(
1209 'title' => __('One Column Container', 'fluentform'),
1210 'icon_class' => 'dashicons dashicons-align-center',
1211 ),
1212 ),
1213 'container_2_col' => array(
1214 'index' => 1,
1215 'element' => 'container',
1216 'attributes' => array(),
1217 'settings' => array(
1218 'container_class' => '',
1219 'conditional_logics' => array()
1220 ),
1221 'columns' => array(
1222 array('fields' => array()),
1223 array('fields' => array()),
1224 ),
1225 'editor_options' =>
1226 array(
1227 'title' => __('Two Column Container', 'fluentform'),
1228 'icon_class' => 'ff-edit-column-2',
1229 ),
1230 ),
1231 'container_3_col' => array(
1232 'index' => 2,
1233 'element' => 'container',
1234 'attributes' => array(),
1235 'settings' => array(
1236 'container_class' => '',
1237 'conditional_logics' => array()
1238 ),
1239 'columns' => array(
1240 array('fields' => array()),
1241 array('fields' => array()),
1242 array('fields' => array()),
1243 ),
1244 'editor_options' => array(
1245 'title' => __('Three Column Container', 'fluentform'),
1246 'icon_class' => 'ff-edit-three-column',
1247 ),
1248 ),
1249 'container_4_col' => array(
1250 'index' => 3,
1251 'element' => 'container',
1252 'attributes' => array(),
1253 'settings' => array(
1254 'container_class' => '',
1255 'conditional_logics' => array()
1256 ),
1257 'columns' => array(
1258 array('fields' => array()),
1259 array('fields' => array()),
1260 array('fields' => array()),
1261 array('fields' => array()),
1262 ),
1263 'editor_options' => array(
1264 'title' => __('Four Column Container', 'fluentform'),
1265 'icon_class' => 'ff-edit-three-column',
1266 ),
1267 ),
1268 'container_5_col' => array(
1269 'index' => 5,
1270 'element' => 'container',
1271 'attributes' => array(),
1272 'settings' => array(
1273 'container_class' => '',
1274 'conditional_logics' => array()
1275 ),
1276 'columns' => array(
1277 array('fields' => array()),
1278 array('fields' => array()),
1279 array('fields' => array()),
1280 array('fields' => array()),
1281 array('fields' => array()),
1282 ),
1283 'editor_options' => array(
1284 'title' => __('Five Column Container', 'fluentform'),
1285 'icon_class' => 'ff-edit-three-column',
1286 ),
1287 ),
1288 'container_6_col' => array(
1289 'index' => 6,
1290 'element' => 'container',
1291 'attributes' => array(),
1292 'settings' => array(
1293 'container_class' => '',
1294 'conditional_logics' => array()
1295 ),
1296 'columns' => array(
1297 array('fields' => array()),
1298 array('fields' => array()),
1299 array('fields' => array()),
1300 array('fields' => array()),
1301 array('fields' => array()),
1302 array('fields' => array()),
1303 ),
1304 'editor_options' => array(
1305 'title' => __('Six Column Container', 'fluentform'),
1306 'icon_class' => 'ff-edit-three-column',
1307 ),
1308 )
1309 )
1310 );
1311
1312
1313 if (!defined('FLUENTFORMPRO')) {
1314 $defaultElements['general']['phone'] = [
1315 'index' => 15,
1316 'element' => 'phone',
1317 'attributes' => [],
1318 'settings' => [],
1319 'editor_options' => [
1320 'title' => 'Phone Field',
1321 'icon_class' => 'el-icon-phone-outline',
1322 'template' => 'inputText'
1323 ],
1324 ];
1325
1326 $defaultElements['advanced']['net_promoter_score'] = [
1327 'index' => 19,
1328 'element' => 'net_promoter_score',
1329 'attributes' => array(),
1330 'settings' => array(),
1331 'options' => array(),
1332 'editor_options' => array(
1333 'title' => 'Net Promoter Score',
1334 'icon_class' => 'ff-edit-rating',
1335 'template' => 'net_promoter',
1336 )
1337 ];
1338
1339 $defaultElements['advanced']['repeater_field'] = [
1340 'index' => 19,
1341 'element' => 'repeater_field',
1342 'attributes' => array(),
1343 'settings' => array(),
1344 'options' => array(),
1345 'editor_options' => array(
1346 'title' => 'Repeat Field',
1347 'icon_class' => 'ff-edit-repeat',
1348 'template' => 'fieldsRepeatSettings'
1349 )
1350 ];
1351
1352 $defaultElements['advanced']['custom_submit_button'] = [
1353 'index' => 15,
1354 'element' => 'custom_submit_button',
1355 'attributes' => [],
1356 'settings' => [],
1357 'editor_options' => [
1358 'title' => 'Custom Submit Button',
1359 'icon_class' => 'dashicons dashicons-arrow-right-alt',
1360 'template' => 'customButton'
1361 ],
1362 ];
1363
1364 $defaultElements['advanced']['rangeslider'] = [
1365 'index' => 15,
1366 'element' => 'rangeslider',
1367 'attributes' => [],
1368 'settings' => [],
1369 'editor_options' => [
1370 'title' => 'Range Slider',
1371 'icon_class' => 'dashicons dashicons-leftright',
1372 'template' => 'inputSlider'
1373 ],
1374 ];
1375
1376
1377 $defaultElements['advanced']['color-picker'] = [
1378 'index' => 15,
1379 'element' => 'color-picker',
1380 'attributes' => [],
1381 'settings' => [],
1382 'editor_options' => [
1383 'title' => 'Color Picker',
1384 'icon_class' => 'ff-edit-tint',
1385 'template' => 'inputText'
1386 ],
1387 ];
1388
1389 $defaultElements['payments'] = array(
1390 'multi_payment_component' => [
1391 'index' => 6,
1392 'element' => 'multi_payment_component',
1393 'attributes' => [],
1394 'settings' => [],
1395 'editor_options' => array(
1396 'title' => __('Payment Field', 'fluentform'),
1397 'icon_class' => 'ff-edit-shopping-cart',
1398 'element' => 'input-radio',
1399 'template' => 'inputMultiPayment'
1400 ),
1401 ],
1402 'custom_payment_component' => [
1403 'index' => 6,
1404 'element' => 'custom_payment_component',
1405 'attributes' => [],
1406 'settings' => [],
1407 'editor_options' => array(
1408 'title' => __('Custom Payment Amount', 'fluentform'),
1409 'icon_class' => 'ff-edit-keyboard-o',
1410 'template' => 'inputText'
1411 )
1412 ],
1413 'item_quantity_component' => [
1414 'index' => 6,
1415 'element' => 'item_quantity_component',
1416 'attributes' => [],
1417 'settings' => [],
1418 'editor_options' => array(
1419 'title' => __('Item Quantity', 'fluentform'),
1420 'icon_class' => 'ff-edit-keyboard-o',
1421 'template' => 'inputText'
1422 ),
1423 ],
1424 'payment_method' => [
1425 'index' => 6,
1426 'element' => 'payment_method',
1427 'attributes' => [],
1428 'settings' => [],
1429 'editor_options' => array(
1430 'title' => 'Payment Method Field',
1431 'icon_class' => 'ff-edit-credit-card',
1432 'template' => 'inputPaymentMethods'
1433 ),
1434 ]
1435 );
1436 }
1437
1438
1439 return $defaultElements;