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