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