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