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

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