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