PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.14
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.14
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
← All changes | app/Services/FormBuilder/ElementCustomization.php +795 -418 3.6.316.2.14 View file →
@@ -5,564 +5,941 @@
5 5 *
6 6 * Returns an array of countries and codes.
7 7 *
8 8 * @author WooThemes
9 + *
9 10 * @category i18n
10 11 * @package fluentform/i18n
12 + *
11 13 * @version 2.5.0
12 14 */
13 -
14 -if (!defined('ABSPATH')) {
15 +if (! defined('ABSPATH')) {
15 16 exit;
16 17 }
17 18
18 -$dateFormats = (new \FluentForm\App\Services\FormBuilder\Components\DateTime)->getAvailableDateFormats();
19 +$fluentformDateFormats = (new \FluentForm\App\Services\FormBuilder\Components\DateTime())->getAvailableDateFormats();
20 +$fluentformRatingIconOptions = \FluentForm\App\Services\FormBuilder\RatingIcon::getPresetOptions();
21 +$fluentformCanAuthorDateConfig = fluentformCanUnfilteredHTML();
19 22
20 -$dateConfigSettings = array(
21 - 'template' => 'inputTextarea',
22 - 'label' => __('Advanced Date Configuration', 'fluentform'),
23 - 'placeholder' => __('Advanced Date Configuration', 'fluentform'),
24 - 'rows' => (defined('FLUENTFORMPRO')) ? 10 : 2,
25 - 'start_text' => (defined('FLUENTFORMPRO')) ? 10 : 2,
26 - 'disabled' => !defined('FLUENTFORMPRO'),
27 - 'css_class' => 'ff_code_editor',
28 - 'inline_help_text' => 'Only valid JS object will work. Please check <a target="_blank" href="https://wpmanageninja.com/docs/fluent-form/field-types/time-date#advanced_configaration">the documentation for available config options</a>',
29 - 'help_text' => __('You can write your own date configaration as JS object. Please write valid configaration as per flatpickr config.', 'fluentform'),
30 -);
23 +$fluentformDateConfigSettings = [
24 + 'template' => 'inputTextarea',
25 + 'label' => __('Advanced Date Configuration', 'fluentform'),
26 + 'placeholder' => __('Advanced Date Configuration', 'fluentform'),
27 + 'rows' => (defined('FLUENTFORMPRO')) ? 10 : 2,
28 + 'start_text' => (defined('FLUENTFORMPRO')) ? 10 : 2,
29 + 'disabled' => ! defined('FLUENTFORMPRO') || ! $fluentformCanAuthorDateConfig,
30 + 'css_class' => 'ff_code_editor',
31 + 'inline_help_text' => 'Only valid JS object will work. Please check <a target="_blank" href="https://docs.fluentforms.com/time-date-input-field">the documentation for available config options</a>',
32 + 'help_text' => __('You can write your own date configuration as JS object. Please write valid configuration as per flatpickr config.', 'fluentform'),
33 +];
31 34
32 -if (!defined('FLUENTFORMPRO')) {
33 - $dateConfigSettings['inline_help_text'] = 'Available on Fluent Forms Pro';
35 +if (! defined('FLUENTFORMPRO')) {
36 + $fluentformDateConfigSettings['inline_help_text'] = 'Available on Fluent Forms Pro';
37 +} elseif (! $fluentformCanAuthorDateConfig) {
38 + $fluentformDateConfigSettings['inline_help_text'] = __('Only administrators can edit the Advanced Date Configuration.', 'fluentform');
34 39 }
35 40
36 -
37 -$element_customization_settings = array(
38 - 'name' => array(
39 - 'template' => 'nameAttr',
40 - 'label' => __('Name Attribute', 'fluentform'),
41 +$fluentformElementCustomizationSettings = [
42 + 'name' => [
43 + 'template' => 'nameAttr',
44 + 'label' => __('Name Attribute', 'fluentform'),
41 45 'help_text' => __('This is the field name attributes which is used to submit form data, name attribute must be unique.', 'fluentform'),
42 - ),
43 - 'label' => array(
44 - 'template' => 'inputText',
45 - 'label' => __('Element Label', 'fluentform'),
46 + ],
47 + 'label' => [
48 + 'template' => 'inputText',
49 + 'label' => __('Element Label', 'fluentform'),
46 50 'help_text' => __('This is the field title the user will see when filling out the form.', 'fluentform'),
47 - ),
48 - 'label_placement' => array(
49 - 'template' => 'radioButton',
50 - 'label' => __('Label Placement', 'fluentform'),
51 + ],
52 + 'label_placement' => [
53 + 'template' => 'radioButton',
54 + 'label' => __('Label Placement', 'fluentform'),
51 55 'help_text' => __('Determine the position of label title where the user will see this. By choosing "Default", global label placement setting will be applied.', 'fluentform'),
52 - 'options' => array(
53 - array(
56 + 'options' => [
57 + [
54 58 'value' => '',
55 59 'label' => __('Default', 'fluentform'),
56 - ),
57 - array(
60 + ],
61 + [
58 62 'value' => 'top',
59 63 'label' => __('Top', 'fluentform'),
60 - ),
61 - array(
64 + ],
65 + [
62 66 'value' => 'right',
63 67 'label' => __('Right', 'fluentform'),
64 - ),
65 - array(
68 + ],
69 + [
66 70 'value' => 'bottom',
67 71 'label' => __('Bottom', 'fluentform'),
68 - ),
69 - array(
72 + ],
73 + [
70 74 'value' => 'left',
71 75 'label' => __('Left', 'fluentform'),
72 - ),
73 - array(
76 + ],
77 + [
74 78 'value' => 'hide_label',
75 79 'label' => __('Hide Label', 'fluentform'),
76 - ),
77 - ),
78 - ),
79 - 'button_style' => array(
80 - 'template' => 'selectBtnStyle',
81 - 'label' => __('Button Style', 'fluentform'),
80 + ],
81 + ],
82 + ],
83 + 'button_style' => [
84 + 'template' => 'selectBtnStyle',
85 + 'label' => __('Button Style', 'fluentform'),
82 86 'help_text' => __('Select a button style from the dropdown', 'fluentform'),
83 - ),
84 - 'button_size' => array(
85 - 'template' => 'radioButton',
86 - 'label' => __('Button Size', 'fluentform'),
87 + ],
88 + 'button_size' => [
89 + 'template' => 'radioButton',
90 + 'label' => __('Button Size', 'fluentform'),
87 91 'help_text' => __('Define a size of the button', 'fluentform'),
88 - 'options' => array(
89 - array(
92 + 'options' => [
93 + [
90 94 'value' => 'sm',
91 95 'label' => __('Small', 'fluentform'),
92 - ),
93 - array(
96 + ],
97 + [
94 98 'value' => 'md',
95 99 'label' => __('Medium', 'fluentform'),
96 - ),
97 - array(
100 + ],
101 + [
98 102 'value' => 'lg',
99 103 'label' => __('Large', 'fluentform'),
100 - ),
101 - )
102 - ),
103 - 'placeholder' => array(
104 - 'template' => 'inputText',
105 - 'label' => __('Placeholder', 'fluentform'),
104 + ],
105 + ],
106 + ],
107 + 'placeholder' => [
108 + 'template' => 'inputText',
109 + 'label' => __('Placeholder', 'fluentform'),
106 110 'help_text' => __('This is the field placeholder, the user will see this if the input field is empty.', 'fluentform'),
107 - ),
108 - 'date_format' => array(
109 - 'template' => 'select',
110 - 'label' => __('Date Format', 'fluentform'),
111 - 'filterable' => true,
112 - 'creatable' => true,
111 + ],
112 + 'date_format' => [
113 + 'template' => 'select',
114 + 'label' => __('Date Format', 'fluentform'),
115 + 'filterable' => true,
116 + 'creatable' => true,
113 117 'placeholder' => __('Select Date Format', 'fluentform'),
114 - 'help_text' => __('Select any date format from the dropdown. The user will be able to choose a date in this given format.', 'fluentform'),
115 - 'options' => $dateFormats,
116 - ),
117 - 'date_config' => $dateConfigSettings,
118 - 'rows' => array(
119 - 'template' => 'inputText',
120 - 'label' => __('Rows', 'fluentform'),
118 + 'help_text' => __('Select any date format from the dropdown. The user will be able to choose a date in this given format.', 'fluentform'),
119 + 'options' => $fluentformDateFormats,
120 + ],
121 + 'date_config' => $fluentformDateConfigSettings,
122 + 'rows' => [
123 + 'template' => 'inputText',
124 + 'label' => __('Rows', 'fluentform'),
121 125 'help_text' => __('How many rows will textarea take in a form. It\'s an HTML attributes for browser support.', 'fluentform'),
122 - ),
123 - 'cols' => array(
124 - 'template' => 'inputText',
125 - 'label' => __('Columns', 'fluentform'),
126 + ],
127 + 'cols' => [
128 + 'template' => 'inputText',
129 + 'label' => __('Columns', 'fluentform'),
126 130 'help_text' => __('How many cols will textarea take in a form. It\'s an HTML attributes for browser support.', 'fluentform'),
127 - ),
128 - 'options' => array(
129 - 'template' => 'selectOptions',
130 - 'label' => __('Options', 'fluentform'),
131 + ],
132 + 'options' => [
133 + 'template' => 'selectOptions',
134 + 'label' => __('Options', 'fluentform'),
131 135 'help_text' => __('Create options for the field and checkmark them for default selection.', 'fluentform'),
132 - ),
133 - 'advanced_options' => array(
134 - 'template' => 'advancedOptions',
135 - 'label' => __('Options', 'fluentform'),
136 + ],
137 + 'advanced_options' => [
138 + 'template' => 'advancedOptions',
139 + 'label' => __('Options', 'fluentform'),
136 140 'help_text' => __('Create visual options for the field and checkmark them for default selection.', 'fluentform'),
137 - ),
138 - 'pricing_options' => array(
139 - 'template' => 'pricingOptions',
140 - 'label' => __('Payment Settings', 'fluentform'),
141 + ],
142 + 'enable_option_groups' => [
143 + 'template' => 'inputYesNoCheckBox',
144 + 'label' => __('Enable Option Grouping', 'fluentform'),
145 + 'help_text' => __('Turn this on to organize dropdown and multiselect options under group labels.', 'fluentform'),
146 + ],
147 + 'enable_select_2' => [
148 + 'template' => 'inputYesNoCheckBox',
149 + 'label' => __('Enable Searchable Smart Options', 'fluentform'),
150 + 'help_text' => __('If you enable this then options will be searchable by select2 js library', 'fluentform'),
151 + 'dependency' => [
152 + 'depends_on' => 'parent_container',
153 + 'operator' => '!=',
154 + 'value' => 'repeater_container',
155 + ],
156 + ],
157 + 'pricing_options' => [
158 + 'template' => 'pricingOptions',
159 + 'label' => __('Payment Items', 'fluentform'),
141 160 'help_text' => __('Set your product type and corresponding prices', 'fluentform'),
142 - ),
143 - 'validation_rules' => array(
144 - 'template' => 'validationRulesForm',
145 - 'label' => __('Validation Rules', 'fluentform'),
161 + ],
162 + 'subscription_options' => [
163 + 'template' => 'subscriptionOptions',
164 + 'label' => __('Subscription Items', 'fluentform'),
165 + 'help_text' => __('Set your subscription plans', 'fluentform'),
166 + ],
167 + 'validation_rules' => [
168 + 'template' => 'validationRulesForm',
169 + 'label' => __('Validation Rules', 'fluentform'),
146 170 'help_text' => '',
147 - ),
148 - 'required_field_message' => array(
149 - 'template' => 'inputRequiredFieldText',
150 - 'label' => __('Required Validation Message', 'fluentform'),
171 + ],
172 + 'required_field_message' => [
173 + 'template' => 'inputRequiredFieldText',
174 + 'label' => __('Required Validation Message', 'fluentform'),
151 175 'help_text' => 'Message for failed validation for this field',
152 - ),
153 - 'tnc_html' => array(
154 - 'template' => 'inputHTML',
155 - 'label' => __('Terms & Conditions', 'fluentform'),
176 + ],
177 + 'tnc_html' => [
178 + 'template' => 'inputHTML',
179 + 'label' => __('Terms & Conditions', 'fluentform'),
156 180 'help_text' => __('Write HTML content for terms & condition checkbox', 'fluentform'),
157 - 'rows' => 4,
158 - 'cols' => 2,
159 - ),
160 - 'hook_name' => array(
161 - 'template' => 'customHookName',
162 - 'label' => __('Hook Name', 'fluentform'),
181 + 'rows' => 4,
182 + 'cols' => 2,
183 + ],
184 + 'hook_name' => [
185 + 'template' => 'customHookName',
186 + 'label' => __('Hook Name', 'fluentform'),
163 187 'help_text' => __('WordPress Hook name to hook something in this place.', 'fluentform'),
164 - ),
165 - 'has_checkbox' => array(
188 + ],
189 + 'has_checkbox' => [
166 190 'template' => 'inputCheckbox',
167 - 'options' => array(
168 - array(
191 + 'options' => [
192 + [
169 193 'value' => true,
170 194 'label' => __('Show Checkbox', 'fluentform'),
171 - ),
172 - ),
173 - ),
174 - 'html_codes' => array(
175 - 'template' => 'inputHTML',
176 - 'rows' => 4,
177 - 'cols' => 2,
178 - 'label' => __('HTML Code', 'fluentform'),
195 + ],
196 + ],
197 + ],
198 + 'html_codes' => [
199 + 'template' => 'inputHTML',
200 + 'rows' => 4,
201 + 'cols' => 2,
202 + 'label' => __('HTML Code', 'fluentform'),
179 203 'help_text' => __('Your valid HTML code will be shown to the user as normal content.', 'fluentform'),
180 - ),
181 - 'description' => array(
182 - 'template' => 'inputHTML',
183 - 'rows' => 4,
184 - 'cols' => 2,
185 - 'label' => __('Description', 'fluentform'),
204 + ],
205 + 'description' => [
206 + 'template' => 'inputHTML',
207 + 'rows' => 4,
208 + 'cols' => 2,
209 + 'label' => __('Description', 'fluentform'),
186 210 'help_text' => __('Description will be shown to the user as normal text content.', 'fluentform'),
187 - ),
188 - 'btn_text' => array(
189 - 'template' => 'inputText',
190 - 'label' => __('Button Text', 'fluentform'),
211 + ],
212 + 'btn_text' => [
213 + 'template' => 'inputText',
214 + 'label' => __('Button Text', 'fluentform'),
191 215 'help_text' => __('This will be visible as button text for upload file.', 'fluentform'),
192 - ),
193 - 'button_ui' => array(
194 - 'template' => 'prevNextButton',
195 - 'label' => __('Submit Button', 'fluentform'),
196 - 'help_text' => __('This is form submission button.', 'fluentform'),
197 - ),
198 - 'align' => array(
199 - 'template' => 'radio',
200 - 'label' => __('Content Alignment', 'fluentform'),
216 + ],
217 + 'button_ui' => [
218 + 'template' => 'prevNextButton',
219 + 'label' => __('Button Text', 'fluentform'),
220 + 'help_text' => __('Set as a default button or image icon type button', 'fluentform'),
221 + ],
222 + 'align' => [
223 + 'template' => 'radio',
224 + 'label' => __('Content Alignment', 'fluentform'),
201 225 'help_text' => __('How the content will be aligned.', 'fluentform'),
202 - 'options' => array(
203 - array(
226 + 'options' => [
227 + [
204 228 'value' => 'left',
205 229 'label' => __('Left', 'fluentform'),
206 - ),
207 - array(
230 + ],
231 + [
208 232 'value' => 'center',
209 233 'label' => __('Center', 'fluentform'),
210 - ),
211 - array(
234 + ],
235 + [
212 236 'value' => 'right',
213 237 'label' => __('Right', 'fluentform'),
214 - ),
215 - ),
216 - ),
217 - 'shortcode' => array(
218 - 'template' => 'inputText',
219 - 'label' => __('Shortcode', 'fluentform'),
238 + ],
239 + ],
240 + ],
241 + 'shortcode' => [
242 + 'template' => 'inputText',
243 + 'label' => __('Shortcode', 'fluentform'),
220 244 'help_text' => __('Your shortcode to render desired content in current place.', 'fluentform'),
221 - ),
222 - 'apply_styles' => array(
223 - 'template' => 'radioButton',
224 - 'label' => __('Apply Styles', 'fluentform'),
245 + ],
246 + 'apply_styles' => [
247 + 'template' => 'radioButton',
248 + 'label' => __('Apply Styles', 'fluentform'),
225 249 'help_text' => __('Apply styles provided here', 'fluentform'),
226 - 'options' => array(
227 - array(
250 + 'options' => [
251 + [
228 252 'value' => true,
229 253 'label' => __('Yes', 'fluentform'),
230 - ),
231 - array(
254 + ],
255 + [
232 256 'value' => false,
233 257 'label' => __('No', 'fluentform'),
234 - )
235 - ),
236 - ),
237 - 'step_title' => array(
238 - 'template' => 'inputText',
239 - 'label' => __('Step Title', 'fluentform'),
258 + ],
259 + ],
260 + ],
261 + 'step_title' => [
262 + 'template' => 'inputText',
263 + 'label' => __('Step Title', 'fluentform'),
240 264 'help_text' => __('Form step titles, user will see each title in each step.', 'fluentform'),
241 - ),
242 - 'disable_auto_focus' => array(
243 - 'template' => 'inputYesNoCheckBox',
244 - 'label' => __('Disable auto focus when changing each page', 'fluentform'),
265 + ],
266 + 'disable_auto_focus' => [
267 + 'template' => 'inputYesNoCheckBox',
268 + 'label' => __('Disable auto focus when changing each page', 'fluentform'),
245 269 'help_text' => __('If you enable this then on page transition automatic scrolling will be disabled', 'fluentform'),
246 - ),
247 - 'enable_auto_slider' => array(
248 - 'template' => 'inputYesNoCheckBox',
249 - 'label' => __('Enable auto page change for single radio field', 'fluentform'),
270 + ],
271 + 'enable_auto_slider' => [
272 + 'template' => 'inputYesNoCheckBox',
273 + 'label' => __('Enable auto page change for single radio field', 'fluentform'),
250 274 'help_text' => __('If you enable this then for last radio item field will trigger next page change', 'fluentform'),
251 - ),
252 - 'enable_step_data_persistency' => array(
253 - 'template' => 'inputYesNoCheckBox',
254 - 'label' => __('Enable Per step data save (Save and Continue)', 'fluentform'),
275 + ],
276 + 'enable_step_data_persistency' => [
277 + 'template' => 'inputYesNoCheckBox',
278 + 'label' => __('Enable Per step data save (Save and Continue)', 'fluentform'),
255 279 'help_text' => __('If you enable this then on each step change the data current step data will be persisted in a step form<br />Your users can resume the form where they left', 'fluentform'),
256 - ),
257 - 'enable_step_page_resume' => array(
258 - 'template' => 'inputYesNoCheckBox',
259 - 'label' => __('Resume Step from last form session', 'fluentform'),
260 - 'help_text' => __('If you enable this then users will see the form as step page where it has been left', 'fluentform'),
261 - 'dependency' => array(
280 + ],
281 + 'enable_step_page_resume' => [
282 + 'template' => 'inputYesNoCheckBox',
283 + 'label' => __('Resume Step from last form session', 'fluentform'),
284 + 'help_text' => __('If you enable this then users will see the form as step page where it has been left', 'fluentform'),
285 + 'dependency' => [
262 286 'depends_on' => 'settings/enable_step_data_persistency',
263 - 'value' => 'yes',
264 - 'operator' => '=='
265 - )
266 - ),
267 - 'progress_indicator' => array(
268 - 'template' => 'radio',
269 - 'label' => __('Progress Indicator', 'fluentform'),
287 + 'value' => 'yes',
288 + 'operator' => '==',
289 + ],
290 + ],
291 + 'progress_indicator' => [
292 + 'template' => 'radio',
293 + 'label' => __('Progress Indicator', 'fluentform'),
270 294 'help_text' => __('Select any of them below, user will see progress of form steps according to your choice.', 'fluentform'),
271 - 'options' => array(
272 - array(
295 + 'options' => [
296 + [
273 297 'value' => 'progress-bar',
274 298 'label' => __('Progress Bar', 'fluentform'),
275 - ),
276 - array(
299 + ],
300 + [
277 301 'value' => 'steps',
278 302 'label' => __('Steps', 'fluentform'),
279 - ),
280 - array(
303 + ],
304 + [
305 + 'value' => 'tabs',
306 + 'label' => __('Tabs', 'fluentform'),
307 + ],
308 + [
281 309 'value' => '',
282 310 'label' => __('None', 'fluentform'),
283 - ),
284 - ),
285 - ),
286 - 'step_titles' => array(
287 - 'template' => 'customStepTitles',
288 - 'label' => __('Step Titles', 'fluentform'),
311 + ],
312 + ],
313 + ],
314 + 'progress_layout' => [
315 + 'template' => 'radioButton',
316 + 'label' => __('Tab Position', 'fluentform'),
317 + 'help_text' => __('Choose how step tabs should be displayed on the frontend.', 'fluentform'),
318 + 'options' => [
319 + [
320 + 'value' => 'top',
321 + 'label' => __('Top', 'fluentform'),
322 + ],
323 + [
324 + 'value' => 'left',
325 + 'label' => __('Left', 'fluentform'),
326 + ],
327 + ],
328 + 'dependency' => [
329 + 'depends_on' => 'settings/progress_indicator',
330 + 'value' => 'tabs',
331 + 'operator' => '==',
332 + ],
333 + ],
334 + 'tabs_show_progress_bar' => [
335 + 'template' => 'inputYesNoCheckBox',
336 + 'label' => __('Show Progress Bar Under Tabs', 'fluentform'),
337 + 'help_text' => __('Enable a compact progress bar under the step tabs.', 'fluentform'),
338 + 'dependency' => [
339 + 'depends_on' => 'settings/progress_indicator',
340 + 'value' => 'tabs',
341 + 'operator' => '==',
342 + ],
343 + ],
344 + 'step_animation' => [
345 + 'template' => 'radioButton',
346 + 'label' => __('Animation type', 'fluentform'),
347 + 'help_text' => __('Select any of them below, steps will change according to your choice.', 'fluentform'),
348 + 'options' => [
349 + [
350 + 'value' => 'slide',
351 + 'label' => __('Slide Left/Right', 'fluentform'),
352 + ],
353 + [
354 + 'value' => 'fade',
355 + 'label' => __('Fade In/Out', 'fluentform'),
356 + ],
357 + [
358 + 'value' => 'slide_down',
359 + 'label' => __('Slide Down/Up', 'fluentform'),
360 + ],
361 + [
362 + 'value' => 'none',
363 + 'label' => __('None', 'fluentform'),
364 + ],
365 + ],
366 + ],
367 + 'step_titles' => [
368 + 'template' => 'customStepTitles',
369 + 'label' => __('Step Titles', 'fluentform'),
289 370 'help_text' => __('Form step titles, user will see each title in each step.', 'fluentform'),
290 - ),
291 - 'prev_btn' => array(
292 - 'template' => 'prevNextButton',
293 - 'label' => __('Previous Button', 'fluentform'),
371 + ],
372 + 'prev_btn' => [
373 + 'template' => 'prevNextButton',
374 + 'label' => __('Previous Button', 'fluentform'),
294 375 'help_text' => __('Multi-step form\'s previous button', 'fluentform'),
295 - ),
296 - 'next_btn' => array(
297 - 'template' => 'prevNextButton',
298 - 'label' => __('Next Button', 'fluentform'),
376 + ],
377 + 'next_btn' => [
378 + 'template' => 'prevNextButton',
379 + 'label' => __('Next Button', 'fluentform'),
299 380 'help_text' => __('Multi-step form\'s next button', 'fluentform'),
300 - ),
301 - 'address_fields' => array(
381 + ],
382 + 'address_fields' => [
302 383 'template' => 'addressFields',
303 - 'label' => __('Address Fields', 'fluentform'),
304 - ),
305 - 'name_fields' => array(
384 + 'label' => __('Address Fields', 'fluentform'),
385 + 'key' => 'country_list',
386 + ],
387 + 'name_fields' => [
306 388 'template' => 'nameFields',
307 - 'label' => __('Name Fields', 'fluentform'),
308 - ),
309 - 'multi_column' => array(
389 + 'label' => __('Name Fields', 'fluentform'),
390 + ],
391 + 'multi_column' => [
310 392 'template' => 'inputCheckbox',
311 - 'options' => array(
312 - array(
393 + 'options' => [
394 + [
313 395 'value' => true,
314 396 'label' => __('Enable Multiple Columns', 'fluentform'),
315 - ),
316 - ),
317 - ),
318 - 'repeat_fields' => array(
319 - 'template' => 'customRepeatFields',
320 - 'label' => __('Repeat Fields', 'fluentform'),
397 + ],
398 + ],
399 + ],
400 + 'repeat_fields' => [
401 + 'template' => 'customRepeatFields',
402 + 'label' => __('Repeat Fields', 'fluentform'),
321 403 'help_text' => __('This is a form field which a user will be able to repeat.', 'fluentform'),
322 - ),
323 - 'admin_field_label' => array(
324 - 'template' => 'inputText',
325 - 'label' => __('Admin Field Label', 'fluentform'),
404 + ],
405 + 'admin_field_label' => [
406 + 'template' => 'inputText',
407 + 'label' => __('Admin Field Label', 'fluentform'),
326 408 'help_text' => __('Admin field label is field title which will be used for admin field title.', 'fluentform'),
327 - ),
328 - 'maxlength' => array(
329 - 'template' => 'inputNumber',
330 - 'label' => __('Max text length', 'fluentform'),
409 + ],
410 + 'maxlength' => [
411 + 'template' => 'inputNumber',
412 + 'label' => __('Max text length', 'fluentform'),
331 413 'help_text' => __('The maximum number of characters the input should accept', 'fluentform'),
332 - ),
333 - 'value' => array(
334 - 'template' => 'inputValue',
335 - 'label' => __('Default Value', 'fluentform'),
414 + ],
415 + 'value' => [
416 + 'template' => 'inputValue',
417 + 'label' => __('Default Value', 'fluentform'),
418 + 'help_text' => __('If you would like to pre-populate the value of a field, enter it here.', 'fluentform') . ' <a target="_blank" rel="noopener" href="https://wpmanageninja.com/docs/fluent-form/miscellaneous/form-editor-smart-codes/">View All the smartcodes here</a>',
419 + ],
420 + 'dynamic_default_value' => [
421 + 'template' => 'inputValue',
422 + 'type' => 'text',
423 + 'label' => __('Dynamic Default Value', 'fluentform'),
336 424 'help_text' => __('If you would like to pre-populate the value of a field, enter it here.', 'fluentform'),
337 - ),
338 - 'dynamic_default_value' => array(
339 - 'template' => 'inputValue',
340 - 'label' => __('Default Value', 'fluentform'),
341 - 'help_text' => __('If you would like to pre-populate the value of a field, enter it here.', 'fluentform'),
342 - ),
343 - 'container_class' => array(
344 - 'template' => 'inputText',
345 - 'label' => __('Container Class', 'fluentform'),
425 + ],
426 + 'max_selection' => [
427 + 'template' => 'inputNumber',
428 + 'type' => 'text',
429 + 'label' => __('Max Selection', 'fluentform'),
430 + 'help_text' => __('Define Max selections items that a user can select .', 'fluentform'),
431 + 'dependency' => [
432 + 'depends_on' => 'attributes/multiple',
433 + 'value' => true,
434 + 'operator' => '==',
435 + ],
436 + ],
437 + 'container_class' => [
438 + 'template' => 'inputText',
439 + 'label' => __('Container Class', 'fluentform'),
346 440 'help_text' => __('Class for the field wrapper. This can be used to style current element.', 'fluentform'),
347 - ),
348 - 'class' => array(
349 - 'template' => 'inputText',
350 - 'label' => __('Element Class', 'fluentform'),
441 + ],
442 + 'class' => [
443 + 'template' => 'inputText',
444 + 'label' => __('Element Class', 'fluentform'),
351 445 'help_text' => __('Class for the field. This can be used to style current element.', 'fluentform'),
352 - ),
353 - 'country_list' => array(
446 + ],
447 + 'country_list' => [
354 448 'template' => 'customCountryList',
355 - 'label' => __('Country List', 'fluentform'),
356 - ),
357 - 'product_field_types' => array(
449 + 'label' => __('Country List', 'fluentform'),
450 + 'key' => 'country_list',
451 + ],
452 + 'product_field_types' => [
358 453 'template' => 'productFieldTypes',
359 - 'label' => __('Options', 'fluentform'),
360 - ),
361 - 'help_message' => array(
362 - 'template' => 'inputTextarea',
363 - 'label' => __('Help Message', 'fluentform'),
454 + 'label' => __('Options', 'fluentform'),
455 + ],
456 + 'help_message' => [
457 + 'template' => 'inputTextarea',
458 + 'label' => __('Help Message', 'fluentform'),
364 459 'help_text' => __('Help message will be shown as tooltip next to sidebar or below the field.', 'fluentform'),
365 - ),
366 - 'conditional_logics' => array(
367 - 'template' => 'conditionalLogics',
368 - 'label' => __('Conditional Logic', 'fluentform'),
460 + ],
461 + 'conditional_logics' => [
462 + 'template' => 'conditionalLogics',
463 + 'label' => __('Conditional Logic', 'fluentform'),
369 464 'help_text' => __('Create rules to dynamically display or hide this field based on values from another field.', 'fluentform'),
370 - ),
371 - 'background_color' => array(
372 - 'template' => 'inputColor',
373 - 'label' => __('Background Color', 'fluentform'),
374 - 'help_text' => __('The Background color of the element', 'fluentform')
375 - ),
376 - 'color' => array(
377 - 'template' => 'inputColor',
378 - 'label' => __('Font Color', 'fluentform'),
379 - 'help_text' => __('Font color of the element', 'fluentform')
380 - ),
381 - 'data-mask' => array(
382 - 'template' => 'customMask',
383 - 'label' => __('Custom Mask', 'fluentform'),
384 - 'help_text' => __('Write your own mask for this input', 'fluentform'),
385 - 'dependency' => array(
465 + ],
466 + 'background_color' => [
467 + 'template' => 'inputColor',
468 + 'label' => __('Background Color', 'fluentform'),
469 + 'help_text' => __('The Background color of the element', 'fluentform'),
470 + ],
471 + 'color' => [
472 + 'template' => 'inputColor',
473 + 'label' => __('Font Color', 'fluentform'),
474 + 'help_text' => __('Font color of the element', 'fluentform'),
475 + ],
476 + 'data-mask' => [
477 + 'template' => 'customMask',
478 + 'label' => __('Custom Mask', 'fluentform'),
479 + 'help_text' => __('Write your own mask for this input', 'fluentform'),
480 + 'dependency' => [
386 481 'depends_on' => 'settings/temp_mask',
387 - 'value' => 'custom',
388 - 'operator' => '=='
389 - )
390 - ),
391 - 'temp_mask' => array(
392 - 'template' => 'select',
393 - 'label' => __('Mask Input', 'fluentform'),
482 + 'value' => 'custom',
483 + 'operator' => '==',
484 + ],
485 + ],
486 + 'data-mask-reverse' => [
487 + 'template' => 'inputYesNoCheckBox',
488 + 'label' => __('Activating a reversible mask', 'fluentform'),
489 + 'help_text' => __('If you enable this then it the mask will work as reverse', 'fluentform'),
490 + 'dependency' => [
491 + 'depends_on' => 'settings/temp_mask',
492 + 'value' => 'custom',
493 + 'operator' => '==',
494 + ],
495 + ],
496 + 'randomize_options' => [
497 + 'template' => 'inputYesNoCheckBox',
498 + 'label' => __('Shuffle the available options', 'fluentform'),
499 + 'help_text' => __('If you enable this then the checkable options will be shuffled', 'fluentform'),
500 + ],
501 + 'data-clear-if-not-match' => [
502 + 'template' => 'inputYesNoCheckBox',
503 + 'label' => __('Clear if not match', 'fluentform'),
504 + 'help_text' => __('Clear value if not match the mask', 'fluentform'),
505 + 'dependency' => [
506 + 'depends_on' => 'settings/temp_mask',
507 + 'value' => 'custom',
508 + 'operator' => '==',
509 + ],
510 + ],
511 + 'temp_mask' => [
512 + 'template' => 'select',
513 + 'label' => __('Mask Input', 'fluentform'),
394 514 'help_text' => __('Select a mask for the input field', 'fluentform'),
395 - 'options' => array(
396 - array(
515 + 'options' => [
516 + [
397 517 'value' => '',
398 518 'label' => __('None', 'fluentform'),
399 - ),
400 - array(
519 + ],
520 + [
401 521 'value' => '(000) 000-0000',
402 522 'label' => '(###) ###-####',
403 - ),
404 - array(
523 + ],
524 + [
405 525 'value' => '(00) 0000-0000',
406 526 'label' => '(##) ####-####',
407 - ),
408 - array(
527 + ],
528 + [
409 529 'value' => '00/00/0000',
410 530 'label' => __('23/03/2018', 'fluentform'),
411 - ),
412 - array(
531 + ],
532 + [
413 533 'value' => '00:00:00',
414 534 'label' => __('23:59:59', 'fluentform'),
415 - ),
416 - array(
535 + ],
536 + [
417 537 'value' => '00/00/0000 00:00:00',
418 538 'label' => __('23/03/2018 23:59:59', 'fluentform'),
419 - ),
420 - array(
539 + ],
540 + [
421 541 'value' => 'custom',
422 542 'label' => __('Custom', 'fluentform'),
423 - )
424 - ),
425 - ),
426 - 'grid_columns' => array(
427 - 'template' => 'gridRowCols',
428 - 'label' => __('Grid Columns', 'fluentform'),
543 + ],
544 + ],
545 + ],
546 + 'grid_columns' => [
547 + 'template' => 'gridRowCols',
548 + 'label' => __('Grid Columns', 'fluentform'),
429 549 'help_text' => __('Write your own mask for this input', 'fluentform'),
430 - ),
431 - 'grid_rows' => array(
432 - 'template' => 'gridRowCols',
433 - 'label' => __('Grid Rows', 'fluentform'),
550 + ],
551 + 'grid_rows' => [
552 + 'template' => 'gridRowCols',
553 + 'label' => __('Grid Rows', 'fluentform'),
434 554 'help_text' => __('Write your own mask for this input', 'fluentform'),
435 - ),
436 - 'tabular_field_type' => array(
437 - 'template' => 'radio',
438 - 'label' => __('Field Type', 'fluentform'),
555 + ],
556 + 'tabular_field_type' => [
557 + 'template' => 'radio',
558 + 'label' => __('Field Type', 'fluentform'),
439 559 'help_text' => __('Field Type', 'fluentform'),
440 - 'options' => array(
441 - array(
560 + 'options' => [
561 + [
442 562 'value' => 'checkbox',
443 563 'label' => __('Checkbox', 'fluentform'),
444 - ),
445 - array(
564 + ],
565 + [
446 566 'value' => 'radio',
447 567 'label' => __('Radio', 'fluentform'),
448 - ),
449 - )
450 - ),
451 - 'max_repeat_field' => array(
452 - 'template' => 'inputNumber',
453 - 'label' => __('Max Repeat inputs', 'fluentform'),
454 - 'help_text' => __('Please provide max number of rows the user can fill up for this repeat field. Keep blank/0 for unlimited numbers', 'fluentform')
455 - ),
456 - 'calculation_settings' => array(
457 - 'template' => (defined('FLUENTFORMPRO')) ? 'inputCalculationSettings' : 'infoBlock',
458 - 'text' => '<b>Calculation Field Settings</b><br />Calculate the value based on other numeric field is available on pro version of WP Fluent Forms. Please install WP Fluent Forms Pro to use this feature',
459 - 'label' => 'Calculation Field Settings',
460 - 'status_label' => 'Enable Calculation',
568 + ],
569 + ],
570 + ],
571 + 'max_repeat_field' => [
572 + 'template' => 'inputNumber',
573 + 'label' => __('Max Repeat inputs', 'fluentform'),
574 + 'help_text' => __('Please provide max number of rows the user can fill up for this repeat field. Keep blank/0 for unlimited numbers', 'fluentform'),
575 + ],
576 + 'calculation_settings' => [
577 + 'template' => (defined('FLUENTFORMPRO')) ? 'inputCalculationSettings' : 'infoBlock',
578 + 'text' => '<strong>Calculation Field Settings</strong><br/>Calculate the value based on other numeric field is available on pro version of Fluent Forms. Please install Fluent Forms Pro to use this feature <br /> <a target="_blank" rel="noopener" href="' . esc_url(fluentform_upgrade_url('feature_lock_calculation')) . '">
579 + Upgrade to Pro </a>',
580 + 'label' => 'Calculation Field Settings',
581 + 'status_label' => 'Enable Calculation',
461 582 'formula_label' => 'Calculation Expression',
462 - 'formula_tips' => 'You can use + - * / for calculating the the value. Use context icon to insert the input values',
463 - 'status_tips' => 'Enable this and provide formula expression if you want this field as calculated based on other numeric field value'
464 - ),
465 - 'min' => array(
466 - 'template' => 'inputNumber',
467 - 'label' => __('Min Value', 'fluentform'),
468 - 'help_text' => __('Please provide minimum value', 'fluentform')
469 - ),
470 - 'max' => array(
471 - 'template' => 'inputNumber',
472 - 'label' => __('Max Value', 'fluentform'),
473 - 'help_text' => __('Please provide Maximum value', 'fluentform')
474 - ),
475 - 'number_step' => array(
476 - 'template' => 'inputText',
477 - 'label' => __('Step', 'fluentform'),
478 - 'help_text' => __('Please provide step attribute for this field. Give value "any" for floating value', 'fluentform')
479 - ),
480 - 'prefix_label' => array(
481 - 'template' => 'inputText',
482 - 'label' => __('Prefix Label', 'fluentform'),
483 - 'help_text' => __('Provide Input Prefix Label. It will show in the input field as prefix label', 'fluentform')
484 - ),
485 - 'suffix_label' => array(
486 - 'template' => 'inputText',
487 - 'label' => __('Suffix Label', 'fluentform'),
488 - 'help_text' => __('Provide Input Suffix Label. It will show in the input field as suffix label', 'fluentform')
489 - ),
490 - 'is_unique' => array(
491 - 'template' => 'select',
492 - 'label' => __('Validate as Unique', 'fluentform'),
583 + 'formula_tips' => 'You can use + - * / for calculating the the value. Use context icon to insert the input values',
584 + 'status_tips' => 'Enable this and provide formula expression if you want this field as calculated based on other numeric field value',
585 + ],
586 + 'min' => [
587 + 'template' => 'inputNumber',
588 + 'label' => __('Min Value', 'fluentform'),
589 + 'help_text' => __('Please provide minimum value', 'fluentform'),
590 + ],
591 + 'max' => [
592 + 'template' => 'inputNumber',
593 + 'label' => __('Max Value', 'fluentform'),
594 + 'help_text' => __('Please provide Maximum value', 'fluentform'),
595 + ],
596 + 'digits' => [
597 + 'template' => 'inputNumber',
598 + 'label' => __('Digits Count', 'fluentform'),
599 + 'help_text' => __('Please provide digits count value', 'fluentform'),
600 + ],
601 + 'number_step' => [
602 + 'template' => 'inputText',
603 + 'label' => __('Step', 'fluentform'),
604 + 'help_text' => __('Please provide step attribute for this field.', 'fluentform'),
605 + ],
606 + 'prefix_label' => [
607 + 'template' => 'inputText',
608 + 'label' => __('Prefix Label', 'fluentform'),
609 + 'help_text' => __('Provide Input Prefix Label. It will show in the input field as prefix label', 'fluentform'),
610 + ],
611 + 'suffix_label' => [
612 + 'template' => 'inputText',
613 + 'label' => __('Suffix Label', 'fluentform'),
614 + 'help_text' => __('Provide Input Suffix Label or Icon or SVG. It will show in the input field as suffix label', 'fluentform'),
615 + ],
616 + 'is_unique' => [
617 + 'template' => 'inputYesNoCheckBox',
618 + 'label' => __('Validate as Unique', 'fluentform'),
493 619 'help_text' => __('If you make it unique then it will validate as unique from previous submissions of this form', 'fluentform'),
494 - 'options' => array(
495 - array(
496 - 'value' => 'no',
497 - 'label' => __('No', 'fluentform'),
498 - ),
499 - array(
500 - 'value' => 'yes',
501 - 'label' => __('Yes', 'fluentform'),
502 - )
503 - )
504 - ),
505 - 'show_text' => array(
506 - 'template' => 'select',
507 - 'label' => __('Show Text', 'fluentform'),
620 + ],
621 + 'show_text' => [
622 + 'template' => 'select',
623 + 'label' => __('Show Text', 'fluentform'),
508 624 'help_text' => __('Show Text value on selection', 'fluentform'),
509 - 'options' => array(
510 - array(
625 + 'options' => [
626 + [
511 627 'value' => 'yes',
512 628 'label' => __('Yes', 'fluentform'),
513 - ),
514 - array(
629 + ],
630 + [
515 631 'value' => 'no',
516 632 'label' => __('No', 'fluentform'),
517 - )
518 - )
519 - ),
520 - 'unique_validation_message' => array(
521 - 'template' => 'inputText',
522 - 'label' => __('Validation Message for Duplicate', 'fluentform'),
523 - 'help_text' => __('If validation failed then it will show this message', 'fluentform'),
524 - 'dependency' => array(
633 + ],
634 + ],
635 + ],
636 + 'icon_source' => [
637 + 'template' => 'select',
638 + 'label' => __('Icon Source', 'fluentform'),
639 + 'help_text' => __('Choose a preset icon or provide a custom SVG icon for this rating field.', 'fluentform'),
640 + 'options' => [
641 + [
642 + 'value' => 'preset',
643 + 'label' => __('Preset Icons', 'fluentform'),
644 + ],
645 + [
646 + 'value' => 'custom_svg',
647 + 'label' => __('Custom SVG', 'fluentform'),
648 + ],
649 + ],
650 + ],
651 + 'icon_type' => [
652 + 'template' => 'select',
653 + 'label' => __('Preset Icon', 'fluentform'),
654 + 'help_text' => __('Select which icon shape to use for this rating field.', 'fluentform'),
655 + 'options' => $fluentformRatingIconOptions,
656 + 'dependency' => [
657 + 'depends_on' => 'settings/icon_source',
658 + 'value' => 'preset',
659 + 'operator' => '==',
660 + ],
661 + ],
662 + 'custom_icon_svg' => [
663 + 'template' => 'inputTextarea',
664 + 'label' => __('Custom SVG Icon', 'fluentform'),
665 + 'help_text' => __('Paste a single inline SVG. Unsupported tags and attributes will be stripped on save.', 'fluentform'),
666 + 'placeholder' => __('<svg viewBox="0 0 24 24">...</svg>', 'fluentform'),
667 + 'rows' => 6,
668 + 'inline_help_text' => __('Use a simple monochrome SVG for the most predictable result across classic and conversational forms.', 'fluentform'),
669 + 'dependency' => [
670 + 'depends_on' => 'settings/icon_source',
671 + 'value' => 'custom_svg',
672 + 'operator' => '==',
673 + ],
674 + ],
675 + 'inactive_color' => [
676 + 'template' => 'inputColor',
677 + 'label' => __('Inactive Color', 'fluentform'),
678 + 'help_text' => __('Color used before a rating item is selected.', 'fluentform'),
679 + ],
680 + 'active_color' => [
681 + 'template' => 'inputColor',
682 + 'label' => __('Active Color', 'fluentform'),
683 + 'help_text' => __('Color used after a rating item becomes active or selected.', 'fluentform'),
684 + ],
685 + 'numeric_formatter' => [
686 + 'template' => 'select',
687 + 'label' => __('Number Format', 'fluentform'),
688 + 'help_text' => __('Select the format of numbers that are allowed in this field. You have the option to use a comma or a dot as the decimal separator.', 'fluentform'),
689 + 'options' => \FluentForm\App\Helpers\Helper::getNumericFormatters(),
690 + ],
691 + 'mobile_keyboard_type' => [
692 + 'template' => 'select',
693 + 'label' => __('Mobile Keyboard Type', 'fluentform'),
694 + 'help_text' => __('Select the keyboard type to display on mobile devices. This only affects the keyboard shown, not validation or accepted characters.', 'fluentform'),
695 + 'options' => [
696 + [
697 + 'value' => '',
698 + 'label' => __('Standard Keyboard', 'fluentform'),
699 + ],
700 + [
701 + 'value' => 'numeric',
702 + 'label' => __('Numeric (0-9)', 'fluentform'),
703 + ],
704 + [
705 + 'value' => 'decimal',
706 + 'label' => __('Decimal (0-9 with .)', 'fluentform'),
707 + ],
708 + [
709 + 'value' => 'tel',
710 + 'label' => __('Telephone (0-9, *, #)', 'fluentform'),
711 + ],
712 + ],
713 + ],
714 + 'mobile_keyboard_type_number' => [
715 + 'template' => 'select',
716 + 'label' => __('Mobile Keyboard Type', 'fluentform'),
717 + 'help_text' => __('Select the keyboard type to display on mobile devices.', 'fluentform'),
718 + 'options' => [
719 + [
720 + 'value' => '',
721 + 'label' => __('Numeric (0-9)', 'fluentform'),
722 + ],
723 + [
724 + 'value' => 'decimal',
725 + 'label' => __('Decimal (0-9 with .)', 'fluentform'),
726 + ],
727 + ],
728 + ],
729 + 'unique_validation_message' => [
730 + 'template' => 'inputText',
731 + 'label' => __('Validation Message for Duplicate', 'fluentform'),
732 + 'help_text' => __('If validation failed then it will show this message', 'fluentform'),
733 + 'dependency' => [
525 734 'depends_on' => 'settings/is_unique',
526 - 'value' => 'yes',
527 - 'operator' => '=='
528 - )
529 - ),
530 - 'layout_class' => array(
531 - 'template' => 'select',
532 - 'label' => __('Layout', 'fluentform'),
735 + 'value' => 'yes',
736 + 'operator' => '==',
737 + ],
738 + ],
739 + 'layout_class' => [
740 + 'template' => 'select',
741 + 'label' => __('Layout', 'fluentform'),
533 742 'help_text' => __('Select the Layout for checkable items', 'fluentform'),
534 - 'options' => array(
535 - array(
743 + 'options' => [
744 + [
536 745 'value' => '',
537 746 'label' => __('Default', 'fluentform'),
538 - ),
539 - array(
747 + ],
748 + [
540 749 'value' => 'ff_list_inline',
541 750 'label' => 'Inline Layout',
542 - ),
543 - array(
751 + ],
752 + [
544 753 'value' => 'ff_list_buttons',
545 754 'label' => 'Button Type Styles',
546 - ),
547 - array(
755 + ],
756 + [
548 757 'value' => 'ff_list_2col',
549 758 'label' => '2-Column Layout',
550 - ),
551 - array(
759 + ],
760 + [
552 761 'value' => 'ff_list_3col',
553 762 'label' => '3-Column Layout',
554 - ),
555 - array(
763 + ],
764 + [
556 765 'value' => 'ff_list_4col',
557 766 'label' => '4-Column Layout',
558 - ),
559 - array(
767 + ],
768 + [
560 769 'value' => 'ff_list_5col',
561 770 'label' => '5-Column Layout',
562 - )
563 - ),
564 - ),
771 + ],
772 + ],
773 + ],
774 + 'upload_file_location' => [
775 + 'template' => 'radio',
776 + 'label' => __('Save Uploads in', 'fluentform'),
777 + 'help_text' => __('Uploaded files can be stored in media library or your server or both.', 'fluentform'),
778 + 'options' => \FluentForm\App\Helpers\Helper::fileUploadLocations(),
779 + 'dependency' => [
780 + 'depends_on' => 'settings/file_location_type',
781 + 'value' => 'custom',
782 + 'operator' => '==',
783 + ],
784 + ],
785 + 'file_location_type' => [
786 + 'template' => 'radioButton',
787 + 'label' => __('File Location Type', 'fluentform'),
788 + 'help_text' => __('Set default or custom location for files', 'fluentform'),
789 + 'options' => [
790 + [
791 + 'value' => 'follow_global_settings',
792 + 'label' => __('As Per Global Settings', 'fluentform'),
793 + ],
794 + [
795 + 'value' => 'custom',
796 + 'label' => __('Custom', 'fluentform'),
797 + ],
798 + ],
799 + ],
800 + 'upload_bttn_ui' => [
801 + 'template' => 'radio',
802 + 'label' => __('Upload Button Interface', 'fluentform'),
803 + 'help_text' => __('Select how the upload button should work show a dropzone or a button', 'fluentform'),
804 + 'options' => [
805 + [
806 + 'value' => '',
807 + 'label' => __('Button', 'fluentform'),
808 + ],
809 + [
810 + 'value' => 'dropzone',
811 + 'label' => __('Dropzone', 'fluentform'),
812 + ],
813 + ],
814 + ],
815 + 'enable_crop' => [
816 + 'template' => 'inputYesNoCheckBox',
817 + 'label' => __('Enable crop', 'fluentform'),
818 + 'help_text' => __('If enabled, users must crop the image before it is uploaded.', 'fluentform'),
819 + ],
820 + 'crop_mode' => [
821 + 'template' => 'radioButton',
822 + 'label' => __('Crop Type', 'fluentform'),
823 + 'help_text' => __('Choose whether users crop by ratio or by exact width and height.', 'fluentform'),
824 + 'options' => [
825 + [
826 + 'value' => 'ratio',
827 + 'label' => __('Crop Ratio', 'fluentform'),
828 + ],
829 + [
830 + 'value' => 'dimensions',
831 + 'label' => __('Width and Height', 'fluentform'),
832 + ],
833 + ],
834 + 'dependency' => [
835 + 'depends_on' => 'settings/enable_crop',
836 + 'value' => 'yes',
837 + 'operator' => '==',
838 + ],
839 + ],
840 + 'crop_ratio' => [
841 + 'template' => 'select',
842 + 'label' => __('Crop ratio', 'fluentform'),
843 + 'help_text' => __('Choose the default crop ratio users will see before upload.', 'fluentform'),
844 + 'options' => [
845 + [
846 + 'value' => 'free',
847 + 'label' => __('Free', 'fluentform'),
848 + ],
849 + [
850 + 'value' => '1:1',
851 + 'label' => '1:1',
852 + ],
853 + [
854 + 'value' => '4:3',
855 + 'label' => '4:3',
856 + ],
857 + [
858 + 'value' => '16:9',
859 + 'label' => '16:9',
860 + ],
861 + [
862 + 'value' => '3:4',
863 + 'label' => '3:4',
864 + ],
865 + ],
866 + ],
867 + 'crop_width' => [
868 + 'template' => 'inputNumber',
869 + 'label' => __('Width (px)', 'fluentform'),
870 + 'help_text' => __('Required crop width in pixels.', 'fluentform'),
871 + ],
872 + 'crop_height' => [
873 + 'template' => 'inputNumber',
874 + 'label' => __('Height (px)', 'fluentform'),
875 + 'help_text' => __('Required crop height in pixels.', 'fluentform'),
876 + ],
877 + 'container_width' => [
878 + 'template' => 'containerWidth',
879 + 'label' => __('Column Width %', 'fluentform'),
880 + 'help_text' => __('Set the width of the columns. The minimum column width is 10%.', 'fluentform'),
881 + 'width_limitation_msg' => __('The minimum column width is 10%', 'fluentform'),
882 + ],
883 + 'render_recaptcha_v3_badge' => [
884 + 'template' => 'radio',
885 + 'label' => __('Render ReCaptcha V3 badge', 'fluentform'),
886 + 'help_text' => __('Select if ReCaptcha V3 verified badge should render in the form or not', 'fluentform'),
887 + 'options' => [
888 + [
889 + 'value' => true,
890 + 'label' => __('Yes', 'fluentform'),
891 + ],
892 + [
893 + 'value' => false,
894 + 'label' => __('No', 'fluentform'),
895 + ],
896 + ],
897 + ],
898 + 'enable_other_option' => [
899 + 'template' => 'inputYesNoCheckBox',
900 + 'label' => __('Enable "Other" Option', 'fluentform'),
901 + 'help_text' => __('Allow users to add a custom option by selecting "Other"', 'fluentform'),
902 + ],
903 + 'other_option_label' => [
904 + 'template' => 'inputText',
905 + 'label' => __('Other Option Label', 'fluentform'),
906 + 'help_text' => __('Label for the "Other" option', 'fluentform'),
907 + 'dependency' => [
908 + 'depends_on' => 'settings/enable_other_option',
909 + 'value' => 'yes',
910 + 'operator' => '==',
911 + ],
912 + ],
913 + 'other_option_placeholder' => [
914 + 'template' => 'inputText',
915 + 'label' => __('Other Option Placeholder', 'fluentform'),
916 + 'help_text' => __('Placeholder text for the "Other" input field', 'fluentform'),
917 + 'dependency' => [
918 + 'depends_on' => 'settings/enable_other_option',
919 + 'value' => 'yes',
920 + 'operator' => '==',
921 + ],
922 + ],
923 + 'other_option_required_message' => [
924 + 'template' => 'inputText',
925 + 'label' => __('Other Option Required Message', 'fluentform'),
926 + 'help_text' => __('Error message shown when the "Other" option is selected but its text field is left empty.', 'fluentform'),
927 + 'dependency' => [
928 + 'depends_on' => 'settings/enable_other_option',
929 + 'value' => 'yes',
930 + 'operator' => '==',
931 + ],
932 + ],
933 +];
934 +
935 +$fluentformElementCustomizationSettings = apply_filters_deprecated(
936 + 'fluentform_editor_element_customization_settings',
937 + [
938 + $fluentformElementCustomizationSettings
939 + ],
940 + FLUENTFORM_FRAMEWORK_UPGRADE,
941 + 'fluentform/editor_element_customization_settings',
942 + 'Use fluentform/editor_element_customization_settings instead of fluent_editor_element_customization_settings.'
565 943 );
566 944
567 -
568 -return apply_filters('fluent_editor_element_customization_settings', $element_customization_settings);
945 +return apply_filters('fluentform/editor_element_customization_settings', $fluentformElementCustomizationSettings);