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 +801 -438 3.6.60 → 6.2.15 View file →
@@ -5,587 +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 configuration as JS object. Please write valid configuration 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 - 'enable_select_2' => array(
139 - 'template' => 'inputYesNoCheckBox',
140 - 'label' => __('Enable Searchable Smart Options', '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'),
141 159 'help_text' => __('If you enable this then options will be searchable by select2 js library', 'fluentform'),
142 - ),
143 - 'pricing_options' => array(
144 - 'template' => 'pricingOptions',
145 - 'label' => __('Payment Items', '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'),
146 169 'help_text' => __('Set your product type and corresponding prices', 'fluentform'),
147 - ),
148 - 'validation_rules' => array(
149 - 'template' => 'validationRulesForm',
150 - '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'),
151 179 'help_text' => '',
152 - ),
153 - 'required_field_message' => array(
154 - 'template' => 'inputRequiredFieldText',
155 - 'label' => __('Required Validation Message', 'fluentform'),
180 + ],
181 + 'required_field_message' => [
182 + 'template' => 'inputRequiredFieldText',
183 + 'label' => __('Required Validation Message', 'fluentform'),
156 184 'help_text' => 'Message for failed validation for this field',
157 - ),
158 - 'tnc_html' => array(
159 - 'template' => 'inputHTML',
160 - 'label' => __('Terms & Conditions', 'fluentform'),
185 + ],
186 + 'tnc_html' => [
187 + 'template' => 'inputHTML',
188 + 'label' => __('Terms & Conditions', 'fluentform'),
161 189 'help_text' => __('Write HTML content for terms & condition checkbox', 'fluentform'),
162 - 'rows' => 4,
163 - 'cols' => 2,
164 - ),
165 - 'hook_name' => array(
166 - 'template' => 'customHookName',
167 - 'label' => __('Hook Name', 'fluentform'),
190 + 'rows' => 4,
191 + 'cols' => 2,
192 + ],
193 + 'hook_name' => [
194 + 'template' => 'customHookName',
195 + 'label' => __('Hook Name', 'fluentform'),
168 196 'help_text' => __('WordPress Hook name to hook something in this place.', 'fluentform'),
169 - ),
170 - 'has_checkbox' => array(
197 + ],
198 + 'has_checkbox' => [
171 199 'template' => 'inputCheckbox',
172 - 'options' => array(
173 - array(
200 + 'options' => [
201 + [
174 202 'value' => true,
175 203 'label' => __('Show Checkbox', 'fluentform'),
176 - ),
177 - ),
178 - ),
179 - 'html_codes' => array(
180 - 'template' => 'inputHTML',
181 - 'rows' => 4,
182 - 'cols' => 2,
183 - 'label' => __('HTML Code', 'fluentform'),
204 + ],
205 + ],
206 + ],
207 + 'html_codes' => [
208 + 'template' => 'inputHTML',
209 + 'rows' => 4,
210 + 'cols' => 2,
211 + 'label' => __('HTML Code', 'fluentform'),
184 212 'help_text' => __('Your valid HTML code will be shown to the user as normal content.', 'fluentform'),
185 - ),
186 - 'description' => array(
187 - 'template' => 'inputHTML',
188 - 'rows' => 4,
189 - 'cols' => 2,
190 - 'label' => __('Description', 'fluentform'),
213 + ],
214 + 'description' => [
215 + 'template' => 'inputHTML',
216 + 'rows' => 4,
217 + 'cols' => 2,
218 + 'label' => __('Description', 'fluentform'),
191 219 'help_text' => __('Description will be shown to the user as normal text content.', 'fluentform'),
192 - ),
193 - 'btn_text' => array(
194 - 'template' => 'inputText',
195 - 'label' => __('Button Text', 'fluentform'),
220 + ],
221 + 'btn_text' => [
222 + 'template' => 'inputText',
223 + 'label' => __('Button Text', 'fluentform'),
196 224 'help_text' => __('This will be visible as button text for upload file.', 'fluentform'),
197 - ),
198 - 'button_ui' => array(
199 - 'template' => 'prevNextButton',
200 - 'label' => __('Submit Button', 'fluentform'),
201 - 'help_text' => __('This is form submission button.', 'fluentform'),
202 - ),
203 - 'align' => array(
204 - 'template' => 'radio',
205 - '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'),
206 234 'help_text' => __('How the content will be aligned.', 'fluentform'),
207 - 'options' => array(
208 - array(
235 + 'options' => [
236 + [
209 237 'value' => 'left',
210 238 'label' => __('Left', 'fluentform'),
211 - ),
212 - array(
239 + ],
240 + [
213 241 'value' => 'center',
214 242 'label' => __('Center', 'fluentform'),
215 - ),
216 - array(
243 + ],
244 + [
217 245 'value' => 'right',
218 246 'label' => __('Right', 'fluentform'),
219 - ),
220 - ),
221 - ),
222 - 'shortcode' => array(
223 - 'template' => 'inputText',
224 - 'label' => __('Shortcode', 'fluentform'),
247 + ],
248 + ],
249 + ],
250 + 'shortcode' => [
251 + 'template' => 'inputText',
252 + 'label' => __('Shortcode', 'fluentform'),
225 253 'help_text' => __('Your shortcode to render desired content in current place.', 'fluentform'),
226 - ),
227 - 'apply_styles' => array(
228 - 'template' => 'radioButton',
229 - 'label' => __('Apply Styles', 'fluentform'),
254 + ],
255 + 'apply_styles' => [
256 + 'template' => 'radioButton',
257 + 'label' => __('Apply Styles', 'fluentform'),
230 258 'help_text' => __('Apply styles provided here', 'fluentform'),
231 - 'options' => array(
232 - array(
259 + 'options' => [
260 + [
233 261 'value' => true,
234 262 'label' => __('Yes', 'fluentform'),
235 - ),
236 - array(
263 + ],
264 + [
237 265 'value' => false,
238 266 'label' => __('No', 'fluentform'),
239 - )
240 - ),
241 - ),
242 - 'step_title' => array(
243 - 'template' => 'inputText',
244 - 'label' => __('Step Title', 'fluentform'),
267 + ],
268 + ],
269 + ],
270 + 'step_title' => [
271 + 'template' => 'inputText',
272 + 'label' => __('Step Title', 'fluentform'),
245 273 'help_text' => __('Form step titles, user will see each title in each step.', 'fluentform'),
246 - ),
247 - 'disable_auto_focus' => array(
248 - 'template' => 'inputYesNoCheckBox',
249 - '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'),
250 278 'help_text' => __('If you enable this then on page transition automatic scrolling will be disabled', 'fluentform'),
251 - ),
252 - 'enable_auto_slider' => array(
253 - 'template' => 'inputYesNoCheckBox',
254 - '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'),
255 283 'help_text' => __('If you enable this then for last radio item field will trigger next page change', 'fluentform'),
256 - ),
257 - 'enable_step_data_persistency' => array(
258 - 'template' => 'inputYesNoCheckBox',
259 - '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'),
260 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'),
261 - ),
262 - 'enable_step_page_resume' => array(
263 - 'template' => 'inputYesNoCheckBox',
264 - 'label' => __('Resume Step from last form session', 'fluentform'),
265 - 'help_text' => __('If you enable this then users will see the form as step page where it has been left', 'fluentform'),
266 - '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' => [
267 295 'depends_on' => 'settings/enable_step_data_persistency',
268 - 'value' => 'yes',
269 - 'operator' => '=='
270 - )
271 - ),
272 - 'progress_indicator' => array(
273 - 'template' => 'radio',
274 - 'label' => __('Progress Indicator', 'fluentform'),
296 + 'value' => 'yes',
297 + 'operator' => '==',
298 + ],
299 + ],
300 + 'progress_indicator' => [
301 + 'template' => 'radio',
302 + 'label' => __('Progress Indicator', 'fluentform'),
275 303 'help_text' => __('Select any of them below, user will see progress of form steps according to your choice.', 'fluentform'),
276 - 'options' => array(
277 - array(
304 + 'options' => [
305 + [
278 306 'value' => 'progress-bar',
279 307 'label' => __('Progress Bar', 'fluentform'),
280 - ),
281 - array(
308 + ],
309 + [
282 310 'value' => 'steps',
283 311 'label' => __('Steps', 'fluentform'),
284 - ),
285 - array(
312 + ],
313 + [
314 + 'value' => 'tabs',
315 + 'label' => __('Tabs', 'fluentform'),
316 + ],
317 + [
286 318 'value' => '',
287 319 'label' => __('None', 'fluentform'),
288 - ),
289 - ),
290 - ),
291 - 'step_titles' => array(
292 - 'template' => 'customStepTitles',
293 - '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'),
294 379 'help_text' => __('Form step titles, user will see each title in each step.', 'fluentform'),
295 - ),
296 - 'prev_btn' => array(
297 - 'template' => 'prevNextButton',
298 - 'label' => __('Previous Button', 'fluentform'),
380 + ],
381 + 'prev_btn' => [
382 + 'template' => 'prevNextButton',
383 + 'label' => __('Previous Button', 'fluentform'),
299 384 'help_text' => __('Multi-step form\'s previous button', 'fluentform'),
300 - ),
301 - 'next_btn' => array(
302 - 'template' => 'prevNextButton',
303 - 'label' => __('Next Button', 'fluentform'),
385 + ],
386 + 'next_btn' => [
387 + 'template' => 'prevNextButton',
388 + 'label' => __('Next Button', 'fluentform'),
304 389 'help_text' => __('Multi-step form\'s next button', 'fluentform'),
305 - ),
306 - 'address_fields' => array(
390 + ],
391 + 'address_fields' => [
307 392 'template' => 'addressFields',
308 - 'label' => __('Address Fields', 'fluentform'),
309 - ),
310 - 'name_fields' => array(
393 + 'label' => __('Address Fields', 'fluentform'),
394 + 'key' => 'country_list',
395 + ],
396 + 'name_fields' => [
311 397 'template' => 'nameFields',
312 - 'label' => __('Name Fields', 'fluentform'),
313 - ),
314 - 'multi_column' => array(
398 + 'label' => __('Name Fields', 'fluentform'),
399 + ],
400 + 'multi_column' => [
315 401 'template' => 'inputCheckbox',
316 - 'options' => array(
317 - array(
402 + 'options' => [
403 + [
318 404 'value' => true,
319 405 'label' => __('Enable Multiple Columns', 'fluentform'),
320 - ),
321 - ),
322 - ),
323 - 'repeat_fields' => array(
324 - 'template' => 'customRepeatFields',
325 - 'label' => __('Repeat Fields', 'fluentform'),
406 + ],
407 + ],
408 + ],
409 + 'repeat_fields' => [
410 + 'template' => 'customRepeatFields',
411 + 'label' => __('Repeat Fields', 'fluentform'),
326 412 'help_text' => __('This is a form field which a user will be able to repeat.', 'fluentform'),
327 - ),
328 - 'admin_field_label' => array(
329 - 'template' => 'inputText',
330 - 'label' => __('Admin Field Label', 'fluentform'),
413 + ],
414 + 'admin_field_label' => [
415 + 'template' => 'inputText',
416 + 'label' => __('Admin Field Label', 'fluentform'),
331 417 'help_text' => __('Admin field label is field title which will be used for admin field title.', 'fluentform'),
332 - ),
333 - 'maxlength' => array(
334 - 'template' => 'inputNumber',
335 - 'label' => __('Max text length', 'fluentform'),
418 + ],
419 + 'maxlength' => [
420 + 'template' => 'inputNumber',
421 + 'label' => __('Max text length', 'fluentform'),
336 422 'help_text' => __('The maximum number of characters the input should accept', 'fluentform'),
337 - ),
338 - 'value' => array(
339 - 'template' => 'inputValue',
340 - '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'),
341 433 'help_text' => __('If you would like to pre-populate the value of a field, enter it here.', 'fluentform'),
342 - ),
343 - 'dynamic_default_value' => array(
344 - 'template' => 'inputValue',
345 - 'type' => 'text',
346 - 'label' => __('Dynamic Default Value', 'fluentform'),
347 - 'help_text' => __('If you would like to pre-populate the value of a field, enter it here.', 'fluentform'),
348 - ),
349 - 'container_class' => array(
350 - 'template' => 'inputText',
351 - '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'),
352 449 'help_text' => __('Class for the field wrapper. This can be used to style current element.', 'fluentform'),
353 - ),
354 - 'class' => array(
355 - 'template' => 'inputText',
356 - 'label' => __('Element Class', 'fluentform'),
450 + ],
451 + 'class' => [
452 + 'template' => 'inputText',
453 + 'label' => __('Element Class', 'fluentform'),
357 454 'help_text' => __('Class for the field. This can be used to style current element.', 'fluentform'),
358 - ),
359 - 'country_list' => array(
455 + ],
456 + 'country_list' => [
360 457 'template' => 'customCountryList',
361 - 'label' => __('Country List', 'fluentform'),
362 - 'key' => 'country_list'
363 - ),
364 - 'product_field_types' => array(
458 + 'label' => __('Country List', 'fluentform'),
459 + 'key' => 'country_list',
460 + ],
461 + 'product_field_types' => [
365 462 'template' => 'productFieldTypes',
366 - 'label' => __('Options', 'fluentform'),
367 - ),
368 - 'help_message' => array(
369 - 'template' => 'inputTextarea',
370 - 'label' => __('Help Message', 'fluentform'),
463 + 'label' => __('Options', 'fluentform'),
464 + ],
465 + 'help_message' => [
466 + 'template' => 'inputTextarea',
467 + 'label' => __('Help Message', 'fluentform'),
371 468 'help_text' => __('Help message will be shown as tooltip next to sidebar or below the field.', 'fluentform'),
372 - ),
373 - 'conditional_logics' => array(
374 - 'template' => 'conditionalLogics',
375 - 'label' => __('Conditional Logic', 'fluentform'),
469 + ],
470 + 'conditional_logics' => [
471 + 'template' => 'conditionalLogics',
472 + 'label' => __('Conditional Logic', 'fluentform'),
376 473 'help_text' => __('Create rules to dynamically display or hide this field based on values from another field.', 'fluentform'),
377 - ),
378 - 'background_color' => array(
379 - 'template' => 'inputColor',
380 - 'label' => __('Background Color', 'fluentform'),
381 - 'help_text' => __('The Background color of the element', 'fluentform')
382 - ),
383 - 'color' => array(
384 - 'template' => 'inputColor',
385 - 'label' => __('Font Color', 'fluentform'),
386 - 'help_text' => __('Font color of the element', 'fluentform')
387 - ),
388 - 'data-mask' => array(
389 - 'template' => 'customMask',
390 - 'label' => __('Custom Mask', 'fluentform'),
391 - 'help_text' => __('Write your own mask for this input', 'fluentform'),
392 - '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' => [
393 490 'depends_on' => 'settings/temp_mask',
394 - 'value' => 'custom',
395 - 'operator' => '=='
396 - )
397 - ),
398 - 'data-mask-reverse' => array(
399 - 'template' => 'inputYesNoCheckBox',
400 - 'label' => __('Activating a reversible mask', 'fluentform'),
401 - 'help_text' => __('If you enable this then it the mask will work as reverse', 'fluentform'),
402 - 'dependency' => array(
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' => [
403 500 'depends_on' => 'settings/temp_mask',
404 - 'value' => 'custom',
405 - 'operator' => '=='
406 - )
407 - ),
408 - 'data-clear-if-not-match' => array(
409 - 'template' => 'inputYesNoCheckBox',
410 - 'label' => __('Clear if not match', 'fluentform'),
411 - 'help_text' => __('Clear value if not match the mask', 'fluentform'),
412 - 'dependency' => array(
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' => [
413 515 'depends_on' => 'settings/temp_mask',
414 - 'value' => 'custom',
415 - 'operator' => '=='
416 - )
417 - ),
418 - 'temp_mask' => array(
419 - 'template' => 'select',
420 - 'label' => __('Mask Input', 'fluentform'),
516 + 'value' => 'custom',
517 + 'operator' => '==',
518 + ],
519 + ],
520 + 'temp_mask' => [
521 + 'template' => 'select',
522 + 'label' => __('Mask Input', 'fluentform'),
421 523 'help_text' => __('Select a mask for the input field', 'fluentform'),
422 - 'options' => array(
423 - array(
524 + 'options' => [
525 + [
424 526 'value' => '',
425 527 'label' => __('None', 'fluentform'),
426 - ),
427 - array(
528 + ],
529 + [
428 530 'value' => '(000) 000-0000',
429 531 'label' => '(###) ###-####',
430 - ),
431 - array(
532 + ],
533 + [
432 534 'value' => '(00) 0000-0000',
433 535 'label' => '(##) ####-####',
434 - ),
435 - array(
536 + ],
537 + [
436 538 'value' => '00/00/0000',
437 539 'label' => __('23/03/2018', 'fluentform'),
438 - ),
439 - array(
540 + ],
541 + [
440 542 'value' => '00:00:00',
441 543 'label' => __('23:59:59', 'fluentform'),
442 - ),
443 - array(
544 + ],
545 + [
444 546 'value' => '00/00/0000 00:00:00',
445 547 'label' => __('23/03/2018 23:59:59', 'fluentform'),
446 - ),
447 - array(
548 + ],
549 + [
448 550 'value' => 'custom',
449 551 'label' => __('Custom', 'fluentform'),
450 - )
451 - ),
452 - ),
453 - 'grid_columns' => array(
454 - 'template' => 'gridRowCols',
455 - 'label' => __('Grid Columns', 'fluentform'),
552 + ],
553 + ],
554 + ],
555 + 'grid_columns' => [
556 + 'template' => 'gridRowCols',
557 + 'label' => __('Grid Columns', 'fluentform'),
456 558 'help_text' => __('Write your own mask for this input', 'fluentform'),
457 - ),
458 - 'grid_rows' => array(
459 - 'template' => 'gridRowCols',
460 - 'label' => __('Grid Rows', 'fluentform'),
559 + ],
560 + 'grid_rows' => [
561 + 'template' => 'gridRowCols',
562 + 'label' => __('Grid Rows', 'fluentform'),
461 563 'help_text' => __('Write your own mask for this input', 'fluentform'),
462 - ),
463 - 'tabular_field_type' => array(
464 - 'template' => 'radio',
465 - 'label' => __('Field Type', 'fluentform'),
564 + ],
565 + 'tabular_field_type' => [
566 + 'template' => 'radio',
567 + 'label' => __('Field Type', 'fluentform'),
466 568 'help_text' => __('Field Type', 'fluentform'),
467 - 'options' => array(
468 - array(
569 + 'options' => [
570 + [
469 571 'value' => 'checkbox',
470 572 'label' => __('Checkbox', 'fluentform'),
471 - ),
472 - array(
573 + ],
574 + [
473 575 'value' => 'radio',
474 576 'label' => __('Radio', 'fluentform'),
475 - ),
476 - )
477 - ),
478 - 'max_repeat_field' => array(
479 - 'template' => 'inputNumber',
480 - 'label' => __('Max Repeat inputs', 'fluentform'),
481 - 'help_text' => __('Please provide max number of rows the user can fill up for this repeat field. Keep blank/0 for unlimited numbers', 'fluentform')
482 - ),
483 - 'calculation_settings' => array(
484 - 'template' => (defined('FLUENTFORMPRO')) ? 'inputCalculationSettings' : 'infoBlock',
485 - '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',
486 - 'label' => 'Calculation Field Settings',
487 - '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',
488 591 'formula_label' => 'Calculation Expression',
489 - 'formula_tips' => 'You can use + - * / for calculating the the value. Use context icon to insert the input values',
490 - 'status_tips' => 'Enable this and provide formula expression if you want this field as calculated based on other numeric field value'
491 - ),
492 - 'min' => array(
493 - 'template' => 'inputNumber',
494 - 'label' => __('Min Value', 'fluentform'),
495 - 'help_text' => __('Please provide minimum value', 'fluentform')
496 - ),
497 - 'max' => array(
498 - 'template' => 'inputNumber',
499 - 'label' => __('Max Value', 'fluentform'),
500 - 'help_text' => __('Please provide Maximum value', 'fluentform')
501 - ),
502 - 'number_step' => array(
503 - 'template' => 'inputText',
504 - 'label' => __('Step', 'fluentform'),
505 - 'help_text' => __('Please provide step attribute for this field. Give value "any" for floating value', 'fluentform')
506 - ),
507 - 'prefix_label' => array(
508 - 'template' => 'inputText',
509 - 'label' => __('Prefix Label', 'fluentform'),
510 - 'help_text' => __('Provide Input Prefix Label. It will show in the input field as prefix label', 'fluentform')
511 - ),
512 - 'suffix_label' => array(
513 - 'template' => 'inputText',
514 - 'label' => __('Suffix Label', 'fluentform'),
515 - 'help_text' => __('Provide Input Suffix Label. It will show in the input field as suffix label', 'fluentform')
516 - ),
517 - 'is_unique' => array(
518 - 'template' => 'inputYesNoCheckBox',
519 - 'label' => __('Validate as Unique', 'fluentform'),
520 - 'help_text' => __('If you make it unique then it will validate as unique from previous submissions of this form', 'fluentform')
521 - ),
522 - 'show_text' => array(
523 - 'template' => 'select',
524 - 'label' => __('Show Text', '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'),
628 + 'help_text' => __('If you make it unique then it will validate as unique from previous submissions of this form', 'fluentform'),
629 + ],
630 + 'show_text' => [
631 + 'template' => 'select',
632 + 'label' => __('Show Text', 'fluentform'),
525 633 'help_text' => __('Show Text value on selection', 'fluentform'),
526 - 'options' => array(
527 - array(
634 + 'options' => [
635 + [
528 636 'value' => 'yes',
529 637 'label' => __('Yes', 'fluentform'),
530 - ),
531 - array(
638 + ],
639 + [
532 640 'value' => 'no',
533 641 'label' => __('No', 'fluentform'),
534 - )
535 - )
536 - ),
537 - 'numeric_formatter' => array(
538 - 'template' => 'select',
539 - 'label' => __('Number Format', 'fluentform'),
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'),
540 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'),
541 - 'options' => \FluentForm\App\Helpers\Helper::getNumericFormatters()
542 - ),
543 - 'unique_validation_message' => array(
544 - 'template' => 'inputText',
545 - 'label' => __('Validation Message for Duplicate', 'fluentform'),
546 - 'help_text' => __('If validation failed then it will show this message', 'fluentform'),
547 - 'dependency' => array(
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' => [
548 743 'depends_on' => 'settings/is_unique',
549 - 'value' => 'yes',
550 - 'operator' => '=='
551 - )
552 - ),
553 - 'layout_class' => array(
554 - 'template' => 'select',
555 - 'label' => __('Layout', 'fluentform'),
744 + 'value' => 'yes',
745 + 'operator' => '==',
746 + ],
747 + ],
748 + 'layout_class' => [
749 + 'template' => 'select',
750 + 'label' => __('Layout', 'fluentform'),
556 751 'help_text' => __('Select the Layout for checkable items', 'fluentform'),
557 - 'options' => array(
558 - array(
752 + 'options' => [
753 + [
559 754 'value' => '',
560 755 'label' => __('Default', 'fluentform'),
561 - ),
562 - array(
756 + ],
757 + [
563 758 'value' => 'ff_list_inline',
564 759 'label' => 'Inline Layout',
565 - ),
566 - array(
760 + ],
761 + [
567 762 'value' => 'ff_list_buttons',
568 763 'label' => 'Button Type Styles',
569 - ),
570 - array(
764 + ],
765 + [
571 766 'value' => 'ff_list_2col',
572 767 'label' => '2-Column Layout',
573 - ),
574 - array(
768 + ],
769 + [
575 770 'value' => 'ff_list_3col',
576 771 'label' => '3-Column Layout',
577 - ),
578 - array(
772 + ],
773 + [
579 774 'value' => 'ff_list_4col',
580 775 'label' => '4-Column Layout',
581 - ),
582 - array(
776 + ],
777 + [
583 778 'value' => 'ff_list_5col',
584 779 'label' => '5-Column Layout',
585 - )
586 - ),
587 - ),
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.'
588 952 );
589 953
590 -
591 -return apply_filters('fluent_editor_element_customization_settings', $element_customization_settings);
954 +return apply_filters('fluentform/editor_element_customization_settings', $fluentformElementCustomizationSettings);