| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* element_customization_settings |
| 5 |
* |
| 6 |
* Returns an array of countries and codes. |
| 7 |
* |
| 8 |
* @author WooThemes |
| 9 |
* @category i18n |
| 10 |
* @package fluentform/i18n |
| 11 |
* @version 2.5.0 |
| 12 |
*/ |
| 13 |
|
| 14 |
if (!defined('ABSPATH')) { |
| 15 |
exit; |
| 16 |
} |
| 17 |
|
| 18 |
$dateFormats = (new \FluentForm\App\Services\FormBuilder\Components\DateTime)->getAvailableDateFormats(); |
| 19 |
|
| 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 |
); |
| 31 |
|
| 32 |
if (!defined('FLUENTFORMPRO')) { |
| 33 |
$dateConfigSettings['inline_help_text'] = 'Available on Fluent Forms Pro'; |
| 34 |
} |
| 35 |
|
| 36 |
|
| 37 |
$element_customization_settings = array( |
| 38 |
'name' => array( |
| 39 |
'template' => 'nameAttr', |
| 40 |
'label' => __('Name Attribute', 'fluentform'), |
| 41 |
'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 |
'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 |
'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( |
| 54 |
'value' => '', |
| 55 |
'label' => __('Default', 'fluentform'), |
| 56 |
), |
| 57 |
array( |
| 58 |
'value' => 'top', |
| 59 |
'label' => __('Top', 'fluentform'), |
| 60 |
), |
| 61 |
array( |
| 62 |
'value' => 'right', |
| 63 |
'label' => __('Right', 'fluentform'), |
| 64 |
), |
| 65 |
array( |
| 66 |
'value' => 'bottom', |
| 67 |
'label' => __('Bottom', 'fluentform'), |
| 68 |
), |
| 69 |
array( |
| 70 |
'value' => 'left', |
| 71 |
'label' => __('Left', 'fluentform'), |
| 72 |
), |
| 73 |
array( |
| 74 |
'value' => 'hide_label', |
| 75 |
'label' => __('Hide Label', 'fluentform'), |
| 76 |
), |
| 77 |
), |
| 78 |
), |
| 79 |
'button_style' => array( |
| 80 |
'template' => 'selectBtnStyle', |
| 81 |
'label' => __('Button Style', 'fluentform'), |
| 82 |
'help_text' => __('Select a button style from the dropdown', 'fluentform'), |
| 83 |
), |
| 84 |
'button_size' => array( |
| 85 |
'template' => 'radioButton', |
| 86 |
'label' => __('Button Size', 'fluentform'), |
| 87 |
'help_text' => __('Define a size of the button', 'fluentform'), |
| 88 |
'options' => array( |
| 89 |
array( |
| 90 |
'value' => 'sm', |
| 91 |
'label' => __('Small', 'fluentform'), |
| 92 |
), |
| 93 |
array( |
| 94 |
'value' => 'md', |
| 95 |
'label' => __('Medium', 'fluentform'), |
| 96 |
), |
| 97 |
array( |
| 98 |
'value' => 'lg', |
| 99 |
'label' => __('Large', 'fluentform'), |
| 100 |
), |
| 101 |
) |
| 102 |
), |
| 103 |
'placeholder' => array( |
| 104 |
'template' => 'inputText', |
| 105 |
'label' => __('Placeholder', 'fluentform'), |
| 106 |
'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, |
| 113 |
'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'), |
| 121 |
'help_text' => __('How many rows will textarea take in a form. It\'s an HTML attributes for browser support.', 'fluentform'), |
| 122 |
), |
| 123 |
'cols' => array( |
| 124 |
'template' => 'inputText', |
| 125 |
'label' => __('Columns', 'fluentform'), |
| 126 |
'help_text' => __('How many cols will textarea take in a form. It\'s an HTML attributes for browser support.', 'fluentform'), |
| 127 |
), |
| 128 |
'options' => array( |
| 129 |
'template' => 'selectOptions', |
| 130 |
'label' => __('Options', 'fluentform'), |
| 131 |
'help_text' => __('Create options for the field and checkmark them for default selection.', 'fluentform'), |
| 132 |
), |
| 133 |
'advanced_options' => array( |
| 134 |
'template' => 'advancedOptions', |
| 135 |
'label' => __('Options', 'fluentform'), |
| 136 |
'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'), |
| 141 |
'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'), |
| 146 |
'help_text' => __('Set your product type and corresponding prices', 'fluentform'), |
| 147 |
), |
| 148 |
'subscription_options' => array( |
| 149 |
'template' => 'subscriptionOptions', |
| 150 |
'label' => __('Subscription Items', 'fluentform'), |
| 151 |
'help_text' => __('Set your subscription plans', 'fluentform'), |
| 152 |
), |
| 153 |
'validation_rules' => array( |
| 154 |
'template' => 'validationRulesForm', |
| 155 |
'label' => __('Validation Rules', 'fluentform'), |
| 156 |
'help_text' => '', |
| 157 |
), |
| 158 |
'required_field_message' => array( |
| 159 |
'template' => 'inputRequiredFieldText', |
| 160 |
'label' => __('Required Validation Message', 'fluentform'), |
| 161 |
'help_text' => 'Message for failed validation for this field', |
| 162 |
), |
| 163 |
'tnc_html' => array( |
| 164 |
'template' => 'inputHTML', |
| 165 |
'label' => __('Terms & Conditions', 'fluentform'), |
| 166 |
'help_text' => __('Write HTML content for terms & condition checkbox', 'fluentform'), |
| 167 |
'rows' => 4, |
| 168 |
'cols' => 2, |
| 169 |
), |
| 170 |
'hook_name' => array( |
| 171 |
'template' => 'customHookName', |
| 172 |
'label' => __('Hook Name', 'fluentform'), |
| 173 |
'help_text' => __('WordPress Hook name to hook something in this place.', 'fluentform'), |
| 174 |
), |
| 175 |
'has_checkbox' => array( |
| 176 |
'template' => 'inputCheckbox', |
| 177 |
'options' => array( |
| 178 |
array( |
| 179 |
'value' => true, |
| 180 |
'label' => __('Show Checkbox', 'fluentform'), |
| 181 |
), |
| 182 |
), |
| 183 |
), |
| 184 |
'html_codes' => array( |
| 185 |
'template' => 'inputHTML', |
| 186 |
'rows' => 4, |
| 187 |
'cols' => 2, |
| 188 |
'label' => __('HTML Code', 'fluentform'), |
| 189 |
'help_text' => __('Your valid HTML code will be shown to the user as normal content.', 'fluentform'), |
| 190 |
), |
| 191 |
'description' => array( |
| 192 |
'template' => 'inputHTML', |
| 193 |
'rows' => 4, |
| 194 |
'cols' => 2, |
| 195 |
'label' => __('Description', 'fluentform'), |
| 196 |
'help_text' => __('Description will be shown to the user as normal text content.', 'fluentform'), |
| 197 |
), |
| 198 |
'btn_text' => array( |
| 199 |
'template' => 'inputText', |
| 200 |
'label' => __('Button Text', 'fluentform'), |
| 201 |
'help_text' => __('This will be visible as button text for upload file.', 'fluentform'), |
| 202 |
), |
| 203 |
'button_ui' => array( |
| 204 |
'template' => 'prevNextButton', |
| 205 |
'label' => __('Submit Button', 'fluentform'), |
| 206 |
'help_text' => __('This is form submission button.', 'fluentform'), |
| 207 |
), |
| 208 |
'align' => array( |
| 209 |
'template' => 'radio', |
| 210 |
'label' => __('Content Alignment', 'fluentform'), |
| 211 |
'help_text' => __('How the content will be aligned.', 'fluentform'), |
| 212 |
'options' => array( |
| 213 |
array( |
| 214 |
'value' => 'left', |
| 215 |
'label' => __('Left', 'fluentform'), |
| 216 |
), |
| 217 |
array( |
| 218 |
'value' => 'center', |
| 219 |
'label' => __('Center', 'fluentform'), |
| 220 |
), |
| 221 |
array( |
| 222 |
'value' => 'right', |
| 223 |
'label' => __('Right', 'fluentform'), |
| 224 |
), |
| 225 |
), |
| 226 |
), |
| 227 |
'shortcode' => array( |
| 228 |
'template' => 'inputText', |
| 229 |
'label' => __('Shortcode', 'fluentform'), |
| 230 |
'help_text' => __('Your shortcode to render desired content in current place.', 'fluentform'), |
| 231 |
), |
| 232 |
'apply_styles' => array( |
| 233 |
'template' => 'radioButton', |
| 234 |
'label' => __('Apply Styles', 'fluentform'), |
| 235 |
'help_text' => __('Apply styles provided here', 'fluentform'), |
| 236 |
'options' => array( |
| 237 |
array( |
| 238 |
'value' => true, |
| 239 |
'label' => __('Yes', 'fluentform'), |
| 240 |
), |
| 241 |
array( |
| 242 |
'value' => false, |
| 243 |
'label' => __('No', 'fluentform'), |
| 244 |
) |
| 245 |
), |
| 246 |
), |
| 247 |
'step_title' => array( |
| 248 |
'template' => 'inputText', |
| 249 |
'label' => __('Step Title', 'fluentform'), |
| 250 |
'help_text' => __('Form step titles, user will see each title in each step.', 'fluentform'), |
| 251 |
), |
| 252 |
'disable_auto_focus' => array( |
| 253 |
'template' => 'inputYesNoCheckBox', |
| 254 |
'label' => __('Disable auto focus when changing each page', 'fluentform'), |
| 255 |
'help_text' => __('If you enable this then on page transition automatic scrolling will be disabled', 'fluentform'), |
| 256 |
), |
| 257 |
'enable_auto_slider' => array( |
| 258 |
'template' => 'inputYesNoCheckBox', |
| 259 |
'label' => __('Enable auto page change for single radio field', 'fluentform'), |
| 260 |
'help_text' => __('If you enable this then for last radio item field will trigger next page change', 'fluentform'), |
| 261 |
), |
| 262 |
'enable_step_data_persistency' => array( |
| 263 |
'template' => 'inputYesNoCheckBox', |
| 264 |
'label' => __('Enable Per step data save (Save and Continue)', 'fluentform'), |
| 265 |
'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'), |
| 266 |
), |
| 267 |
'enable_step_page_resume' => array( |
| 268 |
'template' => 'inputYesNoCheckBox', |
| 269 |
'label' => __('Resume Step from last form session', 'fluentform'), |
| 270 |
'help_text' => __('If you enable this then users will see the form as step page where it has been left', 'fluentform'), |
| 271 |
'dependency' => array( |
| 272 |
'depends_on' => 'settings/enable_step_data_persistency', |
| 273 |
'value' => 'yes', |
| 274 |
'operator' => '==' |
| 275 |
) |
| 276 |
), |
| 277 |
'progress_indicator' => array( |
| 278 |
'template' => 'radio', |
| 279 |
'label' => __('Progress Indicator', 'fluentform'), |
| 280 |
'help_text' => __('Select any of them below, user will see progress of form steps according to your choice.', 'fluentform'), |
| 281 |
'options' => array( |
| 282 |
array( |
| 283 |
'value' => 'progress-bar', |
| 284 |
'label' => __('Progress Bar', 'fluentform'), |
| 285 |
), |
| 286 |
array( |
| 287 |
'value' => 'steps', |
| 288 |
'label' => __('Steps', 'fluentform'), |
| 289 |
), |
| 290 |
array( |
| 291 |
'value' => '', |
| 292 |
'label' => __('None', 'fluentform'), |
| 293 |
), |
| 294 |
), |
| 295 |
), |
| 296 |
'step_titles' => array( |
| 297 |
'template' => 'customStepTitles', |
| 298 |
'label' => __('Step Titles', 'fluentform'), |
| 299 |
'help_text' => __('Form step titles, user will see each title in each step.', 'fluentform'), |
| 300 |
), |
| 301 |
'prev_btn' => array( |
| 302 |
'template' => 'prevNextButton', |
| 303 |
'label' => __('Previous Button', 'fluentform'), |
| 304 |
'help_text' => __('Multi-step form\'s previous button', 'fluentform'), |
| 305 |
), |
| 306 |
'next_btn' => array( |
| 307 |
'template' => 'prevNextButton', |
| 308 |
'label' => __('Next Button', 'fluentform'), |
| 309 |
'help_text' => __('Multi-step form\'s next button', 'fluentform'), |
| 310 |
), |
| 311 |
'address_fields' => array( |
| 312 |
'template' => 'addressFields', |
| 313 |
'label' => __('Address Fields', 'fluentform'), |
| 314 |
'key' => 'country_list', |
| 315 |
), |
| 316 |
'name_fields' => array( |
| 317 |
'template' => 'nameFields', |
| 318 |
'label' => __('Name Fields', 'fluentform'), |
| 319 |
), |
| 320 |
'multi_column' => array( |
| 321 |
'template' => 'inputCheckbox', |
| 322 |
'options' => array( |
| 323 |
array( |
| 324 |
'value' => true, |
| 325 |
'label' => __('Enable Multiple Columns', 'fluentform'), |
| 326 |
), |
| 327 |
), |
| 328 |
), |
| 329 |
'repeat_fields' => array( |
| 330 |
'template' => 'customRepeatFields', |
| 331 |
'label' => __('Repeat Fields', 'fluentform'), |
| 332 |
'help_text' => __('This is a form field which a user will be able to repeat.', 'fluentform'), |
| 333 |
), |
| 334 |
'admin_field_label' => array( |
| 335 |
'template' => 'inputText', |
| 336 |
'label' => __('Admin Field Label', 'fluentform'), |
| 337 |
'help_text' => __('Admin field label is field title which will be used for admin field title.', 'fluentform'), |
| 338 |
), |
| 339 |
'maxlength' => array( |
| 340 |
'template' => 'inputNumber', |
| 341 |
'label' => __('Max text length', 'fluentform'), |
| 342 |
'help_text' => __('The maximum number of characters the input should accept', 'fluentform'), |
| 343 |
), |
| 344 |
'value' => array( |
| 345 |
'template' => 'inputValue', |
| 346 |
'label' => __('Default Value', 'fluentform'), |
| 347 |
'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>', |
| 348 |
), |
| 349 |
'dynamic_default_value' => array( |
| 350 |
'template' => 'inputValue', |
| 351 |
'type' => 'text', |
| 352 |
'label' => __('Dynamic Default Value', 'fluentform'), |
| 353 |
'help_text' => __('If you would like to pre-populate the value of a field, enter it here.', 'fluentform'), |
| 354 |
), |
| 355 |
'max_selection' => array( |
| 356 |
'template' => 'inputNumber', |
| 357 |
'type' => 'text', |
| 358 |
'label' => __('Max Selection', 'fluentform'), |
| 359 |
'help_text' => __('Define Max selections items that a user can select .', 'fluentform'), |
| 360 |
'dependency' => array( |
| 361 |
'depends_on' => 'attributes/multiple', |
| 362 |
'value' => true, |
| 363 |
'operator' => '==' |
| 364 |
) |
| 365 |
), |
| 366 |
'container_class' => array( |
| 367 |
'template' => 'inputText', |
| 368 |
'label' => __('Container Class', 'fluentform'), |
| 369 |
'help_text' => __('Class for the field wrapper. This can be used to style current element.', 'fluentform'), |
| 370 |
), |
| 371 |
'class' => array( |
| 372 |
'template' => 'inputText', |
| 373 |
'label' => __('Element Class', 'fluentform'), |
| 374 |
'help_text' => __('Class for the field. This can be used to style current element.', 'fluentform'), |
| 375 |
), |
| 376 |
'country_list' => array( |
| 377 |
'template' => 'customCountryList', |
| 378 |
'label' => __('Country List', 'fluentform'), |
| 379 |
'key' => 'country_list' |
| 380 |
), |
| 381 |
'product_field_types' => array( |
| 382 |
'template' => 'productFieldTypes', |
| 383 |
'label' => __('Options', 'fluentform'), |
| 384 |
), |
| 385 |
'help_message' => array( |
| 386 |
'template' => 'inputTextarea', |
| 387 |
'label' => __('Help Message', 'fluentform'), |
| 388 |
'help_text' => __('Help message will be shown as tooltip next to sidebar or below the field.', 'fluentform'), |
| 389 |
), |
| 390 |
'conditional_logics' => array( |
| 391 |
'template' => 'conditionalLogics', |
| 392 |
'label' => __('Conditional Logic', 'fluentform'), |
| 393 |
'help_text' => __('Create rules to dynamically display or hide this field based on values from another field.', 'fluentform'), |
| 394 |
), |
| 395 |
'background_color' => array( |
| 396 |
'template' => 'inputColor', |
| 397 |
'label' => __('Background Color', 'fluentform'), |
| 398 |
'help_text' => __('The Background color of the element', 'fluentform') |
| 399 |
), |
| 400 |
'color' => array( |
| 401 |
'template' => 'inputColor', |
| 402 |
'label' => __('Font Color', 'fluentform'), |
| 403 |
'help_text' => __('Font color of the element', 'fluentform') |
| 404 |
), |
| 405 |
'data-mask' => array( |
| 406 |
'template' => 'customMask', |
| 407 |
'label' => __('Custom Mask', 'fluentform'), |
| 408 |
'help_text' => __('Write your own mask for this input', 'fluentform'), |
| 409 |
'dependency' => array( |
| 410 |
'depends_on' => 'settings/temp_mask', |
| 411 |
'value' => 'custom', |
| 412 |
'operator' => '==' |
| 413 |
) |
| 414 |
), |
| 415 |
'data-mask-reverse' => array( |
| 416 |
'template' => 'inputYesNoCheckBox', |
| 417 |
'label' => __('Activating a reversible mask', 'fluentform'), |
| 418 |
'help_text' => __('If you enable this then it the mask will work as reverse', 'fluentform'), |
| 419 |
'dependency' => array( |
| 420 |
'depends_on' => 'settings/temp_mask', |
| 421 |
'value' => 'custom', |
| 422 |
'operator' => '==' |
| 423 |
) |
| 424 |
), |
| 425 |
'randomize_options' => array( |
| 426 |
'template' => 'inputYesNoCheckBox', |
| 427 |
'label' => __('Shuffle the available options', 'fluentform'), |
| 428 |
'help_text' => __('If you enable this then the checkable options will be shuffled', 'fluentform') |
| 429 |
), |
| 430 |
'data-clear-if-not-match' => array( |
| 431 |
'template' => 'inputYesNoCheckBox', |
| 432 |
'label' => __('Clear if not match', 'fluentform'), |
| 433 |
'help_text' => __('Clear value if not match the mask', 'fluentform'), |
| 434 |
'dependency' => array( |
| 435 |
'depends_on' => 'settings/temp_mask', |
| 436 |
'value' => 'custom', |
| 437 |
'operator' => '==' |
| 438 |
) |
| 439 |
), |
| 440 |
'temp_mask' => array( |
| 441 |
'template' => 'select', |
| 442 |
'label' => __('Mask Input', 'fluentform'), |
| 443 |
'help_text' => __('Select a mask for the input field', 'fluentform'), |
| 444 |
'options' => array( |
| 445 |
array( |
| 446 |
'value' => '', |
| 447 |
'label' => __('None', 'fluentform'), |
| 448 |
), |
| 449 |
array( |
| 450 |
'value' => '(000) 000-0000', |
| 451 |
'label' => '(###) ###-####', |
| 452 |
), |
| 453 |
array( |
| 454 |
'value' => '(00) 0000-0000', |
| 455 |
'label' => '(##) ####-####', |
| 456 |
), |
| 457 |
array( |
| 458 |
'value' => '00/00/0000', |
| 459 |
'label' => __('23/03/2018', 'fluentform'), |
| 460 |
), |
| 461 |
array( |
| 462 |
'value' => '00:00:00', |
| 463 |
'label' => __('23:59:59', 'fluentform'), |
| 464 |
), |
| 465 |
array( |
| 466 |
'value' => '00/00/0000 00:00:00', |
| 467 |
'label' => __('23/03/2018 23:59:59', 'fluentform'), |
| 468 |
), |
| 469 |
array( |
| 470 |
'value' => 'custom', |
| 471 |
'label' => __('Custom', 'fluentform'), |
| 472 |
) |
| 473 |
), |
| 474 |
), |
| 475 |
'grid_columns' => array( |
| 476 |
'template' => 'gridRowCols', |
| 477 |
'label' => __('Grid Columns', 'fluentform'), |
| 478 |
'help_text' => __('Write your own mask for this input', 'fluentform'), |
| 479 |
), |
| 480 |
'grid_rows' => array( |
| 481 |
'template' => 'gridRowCols', |
| 482 |
'label' => __('Grid Rows', 'fluentform'), |
| 483 |
'help_text' => __('Write your own mask for this input', 'fluentform'), |
| 484 |
), |
| 485 |
'tabular_field_type' => array( |
| 486 |
'template' => 'radio', |
| 487 |
'label' => __('Field Type', 'fluentform'), |
| 488 |
'help_text' => __('Field Type', 'fluentform'), |
| 489 |
'options' => array( |
| 490 |
array( |
| 491 |
'value' => 'checkbox', |
| 492 |
'label' => __('Checkbox', 'fluentform'), |
| 493 |
), |
| 494 |
array( |
| 495 |
'value' => 'radio', |
| 496 |
'label' => __('Radio', 'fluentform'), |
| 497 |
), |
| 498 |
) |
| 499 |
), |
| 500 |
'max_repeat_field' => array( |
| 501 |
'template' => 'inputNumber', |
| 502 |
'label' => __('Max Repeat inputs', 'fluentform'), |
| 503 |
'help_text' => __('Please provide max number of rows the user can fill up for this repeat field. Keep blank/0 for unlimited numbers', 'fluentform') |
| 504 |
), |
| 505 |
'calculation_settings' => array( |
| 506 |
'template' => (defined('FLUENTFORMPRO')) ? 'inputCalculationSettings' : 'infoBlock', |
| 507 |
'text' => '<b>Calculation Field Settings</b><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', |
| 508 |
'label' => 'Calculation Field Settings', |
| 509 |
'status_label' => 'Enable Calculation', |
| 510 |
'formula_label' => 'Calculation Expression', |
| 511 |
'formula_tips' => 'You can use + - * / for calculating the the value. Use context icon to insert the input values', |
| 512 |
'status_tips' => 'Enable this and provide formula expression if you want this field as calculated based on other numeric field value' |
| 513 |
), |
| 514 |
'min' => array( |
| 515 |
'template' => 'inputNumber', |
| 516 |
'label' => __('Min Value', 'fluentform'), |
| 517 |
'help_text' => __('Please provide minimum value', 'fluentform') |
| 518 |
), |
| 519 |
'max' => array( |
| 520 |
'template' => 'inputNumber', |
| 521 |
'label' => __('Max Value', 'fluentform'), |
| 522 |
'help_text' => __('Please provide Maximum value', 'fluentform') |
| 523 |
), |
| 524 |
'digits' => array( |
| 525 |
'template' => 'inputNumber', |
| 526 |
'label' => __('Digits Count', 'fluentform'), |
| 527 |
'help_text' => __('Please provide digits count value', 'fluentform') |
| 528 |
), |
| 529 |
'number_step' => array( |
| 530 |
'template' => 'inputText', |
| 531 |
'label' => __('Step', 'fluentform'), |
| 532 |
'help_text' => __('Please provide step attribute for this field. Give value "any" for floating value', 'fluentform') |
| 533 |
), |
| 534 |
'prefix_label' => array( |
| 535 |
'template' => 'inputText', |
| 536 |
'label' => __('Prefix Label', 'fluentform'), |
| 537 |
'help_text' => __('Provide Input Prefix Label. It will show in the input field as prefix label', 'fluentform') |
| 538 |
), |
| 539 |
'suffix_label' => array( |
| 540 |
'template' => 'inputText', |
| 541 |
'label' => __('Suffix Label', 'fluentform'), |
| 542 |
'help_text' => __('Provide Input Suffix Label. It will show in the input field as suffix label', 'fluentform') |
| 543 |
), |
| 544 |
'is_unique' => array( |
| 545 |
'template' => 'inputYesNoCheckBox', |
| 546 |
'label' => __('Validate as Unique', 'fluentform'), |
| 547 |
'help_text' => __('If you make it unique then it will validate as unique from previous submissions of this form', 'fluentform') |
| 548 |
), |
| 549 |
'show_text' => array( |
| 550 |
'template' => 'select', |
| 551 |
'label' => __('Show Text', 'fluentform'), |
| 552 |
'help_text' => __('Show Text value on selection', 'fluentform'), |
| 553 |
'options' => array( |
| 554 |
array( |
| 555 |
'value' => 'yes', |
| 556 |
'label' => __('Yes', 'fluentform'), |
| 557 |
), |
| 558 |
array( |
| 559 |
'value' => 'no', |
| 560 |
'label' => __('No', 'fluentform'), |
| 561 |
) |
| 562 |
) |
| 563 |
), |
| 564 |
'numeric_formatter' => array( |
| 565 |
'template' => 'select', |
| 566 |
'label' => __('Number Format', 'fluentform'), |
| 567 |
'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'), |
| 568 |
'options' => \FluentForm\App\Helpers\Helper::getNumericFormatters() |
| 569 |
), |
| 570 |
'unique_validation_message' => array( |
| 571 |
'template' => 'inputText', |
| 572 |
'label' => __('Validation Message for Duplicate', 'fluentform'), |
| 573 |
'help_text' => __('If validation failed then it will show this message', 'fluentform'), |
| 574 |
'dependency' => array( |
| 575 |
'depends_on' => 'settings/is_unique', |
| 576 |
'value' => 'yes', |
| 577 |
'operator' => '==' |
| 578 |
) |
| 579 |
), |
| 580 |
'layout_class' => array( |
| 581 |
'template' => 'select', |
| 582 |
'label' => __('Layout', 'fluentform'), |
| 583 |
'help_text' => __('Select the Layout for checkable items', 'fluentform'), |
| 584 |
'options' => array( |
| 585 |
array( |
| 586 |
'value' => '', |
| 587 |
'label' => __('Default', 'fluentform'), |
| 588 |
), |
| 589 |
array( |
| 590 |
'value' => 'ff_list_inline', |
| 591 |
'label' => 'Inline Layout', |
| 592 |
), |
| 593 |
array( |
| 594 |
'value' => 'ff_list_buttons', |
| 595 |
'label' => 'Button Type Styles', |
| 596 |
), |
| 597 |
array( |
| 598 |
'value' => 'ff_list_2col', |
| 599 |
'label' => '2-Column Layout', |
| 600 |
), |
| 601 |
array( |
| 602 |
'value' => 'ff_list_3col', |
| 603 |
'label' => '3-Column Layout', |
| 604 |
), |
| 605 |
array( |
| 606 |
'value' => 'ff_list_4col', |
| 607 |
'label' => '4-Column Layout', |
| 608 |
), |
| 609 |
array( |
| 610 |
'value' => 'ff_list_5col', |
| 611 |
'label' => '5-Column Layout', |
| 612 |
) |
| 613 |
), |
| 614 |
), |
| 615 |
'upload_file_location' => array( |
| 616 |
'template' => 'radio', |
| 617 |
'label' => __('Save Uploads in', 'fluentform'), |
| 618 |
'help_text' => __('Uploaded files can be stored in media library or your server or both.', 'fluentform'), |
| 619 |
'options' => \FluentForm\App\Helpers\Helper::fileUploadLocations(), |
| 620 |
'dependency' => array( |
| 621 |
'depends_on' => 'settings/file_location_type', |
| 622 |
'value' => 'custom', |
| 623 |
'operator' => '==' |
| 624 |
) |
| 625 |
), |
| 626 |
'file_location_type' => array( |
| 627 |
'template' => 'radioButton', |
| 628 |
'label' => __('File Location Type', 'fluentform'), |
| 629 |
'help_text' => __('Set default or custom location for files', 'fluentform'), |
| 630 |
'options' => array( |
| 631 |
array( |
| 632 |
'value' => 'follow_global_settings', |
| 633 |
'label' => __('As Per Global Settings', 'fluentform'), |
| 634 |
), |
| 635 |
array( |
| 636 |
'value' => 'custom', |
| 637 |
'label' => __('Custom', 'fluentform'), |
| 638 |
), |
| 639 |
), |
| 640 |
), |
| 641 |
'container_width' => array( |
| 642 |
'template' => 'containerWidth', |
| 643 |
'label' => __('Column Width %', 'fluentform'), |
| 644 |
'help_text' => __('Set the width of the columns. The minimum column width is 10%.', 'fluentform'), |
| 645 |
'width_limitation_msg' => __('The minimum column width is 10%', 'fluentform') |
| 646 |
), |
| 647 |
); |
| 648 |
|
| 649 |
|
| 650 |
return apply_filters('fluent_editor_element_customization_settings', $element_customization_settings); |
| 651 |
|