| @@ -8,8 +8,9 @@ | ||
| 8 | 8 | 'input_name' => [ |
| 9 | 9 | 'index' => 0, |
| 10 | 10 | 'element' => 'input_name', |
| 11 | 11 | 'attributes' => [ |
| 12 | + 'autocomplete' => '', | |
| 12 | 13 | 'name' => 'names', |
| 13 | 14 | 'data-type' => 'name-element', |
| 14 | 15 | ], |
| 15 | 16 | 'settings' => [ |
| @@ -204,8 +205,9 @@ | ||
| 204 | 205 | 'input_email' => [ |
| 205 | 206 | 'index' => 1, |
| 206 | 207 | 'element' => 'input_email', |
| 207 | 208 | 'attributes' => [ |
| 209 | + 'autocomplete' => '', | |
| 208 | 210 | 'type' => 'email', |
| 209 | 211 | 'name' => 'email', |
| 210 | 212 | 'value' => '', |
| 211 | 213 | 'id' => '', |
| @@ -247,8 +249,9 @@ | ||
| 247 | 249 | 'input_text' => [ |
| 248 | 250 | 'index' => 2, |
| 249 | 251 | 'element' => 'input_text', |
| 250 | 252 | 'attributes' => [ |
| 253 | + 'autocomplete' => '', | |
| 251 | 254 | 'type' => 'text', |
| 252 | 255 | 'name' => 'input_text', |
| 253 | 256 | 'value' => '', |
| 254 | 257 | 'class' => '', |
| @@ -284,8 +287,9 @@ | ||
| 284 | 287 | 'input_mask' => [ |
| 285 | 288 | 'index' => 2, |
| 286 | 289 | 'element' => 'input_text', |
| 287 | 290 | 'attributes' => [ |
| 291 | + 'autocomplete' => '', | |
| 288 | 292 | 'type' => 'text', |
| 289 | 293 | 'name' => 'input_mask', |
| 290 | 294 | 'data-mask' => '', |
| 291 | 295 | 'value' => '', |
| @@ -323,8 +327,9 @@ | ||
| 323 | 327 | 'textarea' => [ |
| 324 | 328 | 'index' => 3, |
| 325 | 329 | 'element' => 'textarea', |
| 326 | 330 | 'attributes' => [ |
| 331 | + 'autocomplete' => '', | |
| 327 | 332 | 'name' => 'description', |
| 328 | 333 | 'value' => '', |
| 329 | 334 | 'id' => '', |
| 330 | 335 | 'class' => '', |
| @@ -360,8 +365,9 @@ | ||
| 360 | 365 | 'address' => [ |
| 361 | 366 | 'index' => 4, |
| 362 | 367 | 'element' => 'address', |
| 363 | 368 | 'attributes' => [ |
| 369 | + 'autocomplete' => '', | |
| 364 | 370 | 'id' => '', |
| 365 | 371 | 'class' => '', |
| 366 | 372 | 'name' => 'address_1', |
| 367 | 373 | 'data-type' => 'address-element', |
| @@ -753,8 +759,9 @@ | ||
| 753 | 759 | 'input_number' => [ |
| 754 | 760 | 'index' => 6, |
| 755 | 761 | 'element' => 'input_number', |
| 756 | 762 | 'attributes' => [ |
| 763 | + 'autocomplete' => '', | |
| 757 | 764 | 'type' => 'number', |
| 758 | 765 | 'name' => 'numeric_field', |
| 759 | 766 | 'value' => '', |
| 760 | 767 | 'id' => '', |
| @@ -819,8 +826,9 @@ | ||
| 819 | 826 | 'select' => [ |
| 820 | 827 | 'index' => 7, |
| 821 | 828 | 'element' => 'select', |
| 822 | 829 | 'attributes' => [ |
| 830 | + 'autocomplete' => '', | |
| 823 | 831 | 'name' => 'dropdown', |
| 824 | 832 | 'value' => '', |
| 825 | 833 | 'id' => '', |
| 826 | 834 | 'class' => '', |
| @@ -905,8 +913,9 @@ | ||
| 905 | 913 | 'randomize_options' => 'no', |
| 906 | 914 | 'enable_other_option' => 'no', |
| 907 | 915 | 'other_option_label' => __('Other', 'fluentform'), |
| 908 | 916 | 'other_option_placeholder' => __('Please specify...', 'fluentform'), |
| 917 | + 'other_option_required_message' => __('Please specify a value for the selected "Other" option', 'fluentform'), | |
| 909 | 918 | 'validation_rules' => [ |
| 910 | 919 | 'required' => [ |
| 911 | 920 | 'value' => false, |
| 912 | 921 | 'message' => $fluentformDefaultGlobalMessages['required'], |
| @@ -966,8 +975,9 @@ | ||
| 966 | 975 | 'randomize_options' => 'no', |
| 967 | 976 | 'enable_other_option' => 'no', |
| 968 | 977 | 'other_option_label' => __('Other', 'fluentform'), |
| 969 | 978 | 'other_option_placeholder' => __('Please specify...', 'fluentform'), |
| 979 | + 'other_option_required_message' => __('Please specify a value for the selected "Other" option', 'fluentform'), | |
| 970 | 980 | 'validation_rules' => [ |
| 971 | 981 | 'required' => [ |
| 972 | 982 | 'value' => false, |
| 973 | 983 | 'message' => $fluentformDefaultGlobalMessages['required'], |
| @@ -973,8 +983,21 @@ | ||
| 973 | 983 | 'message' => $fluentformDefaultGlobalMessages['required'], |
| 974 | 984 | 'global_message' => $fluentformDefaultGlobalMessages['required'], |
| 975 | 985 | 'global' => true, |
| 976 | 986 | ], |
| 987 | + // Key order is the panel's layout order. | |
| 988 | + 'max_selection' => [ | |
| 989 | + 'value' => '', | |
| 990 | + 'message' => $fluentformDefaultGlobalMessages['max_selection'], | |
| 991 | + 'global_message' => $fluentformDefaultGlobalMessages['max_selection'], | |
| 992 | + 'global' => true, | |
| 993 | + ], | |
| 994 | + 'min_selection' => [ | |
| 995 | + 'value' => '', | |
| 996 | + 'message' => $fluentformDefaultGlobalMessages['min_selection'], | |
| 997 | + 'global_message' => $fluentformDefaultGlobalMessages['min_selection'], | |
| 998 | + 'global' => true, | |
| 999 | + ], | |
| 977 | 1000 | ], |
| 978 | 1001 | 'conditional_logics' => [], |
| 979 | 1002 | 'layout_class' => '', |
| 980 | 1003 | ], |
| @@ -987,8 +1010,9 @@ | ||
| 987 | 1010 | 'multi_select' => [ |
| 988 | 1011 | 'index' => 10, |
| 989 | 1012 | 'element' => 'select', |
| 990 | 1013 | 'attributes' => [ |
| 1014 | + 'autocomplete' => '', | |
| 991 | 1015 | 'name' => 'multi_select', |
| 992 | 1016 | 'value' => [], |
| 993 | 1017 | 'id' => '', |
| 994 | 1018 | 'class' => '', |
| @@ -1026,8 +1050,22 @@ | ||
| 1026 | 1050 | 'message' => $fluentformDefaultGlobalMessages['required'], |
| 1027 | 1051 | 'global_message' => $fluentformDefaultGlobalMessages['required'], |
| 1028 | 1052 | 'global' => true, |
| 1029 | 1053 | ], |
| 1054 | + // settings.max_selection above stays as the legacy fallback; | |
| 1055 | + // only a rule can carry an editable error message. | |
| 1056 | + 'max_selection' => [ | |
| 1057 | + 'value' => '', | |
| 1058 | + 'message' => $fluentformDefaultGlobalMessages['max_selection'], | |
| 1059 | + 'global_message' => $fluentformDefaultGlobalMessages['max_selection'], | |
| 1060 | + 'global' => true, | |
| 1061 | + ], | |
| 1062 | + 'min_selection' => [ | |
| 1063 | + 'value' => '', | |
| 1064 | + 'message' => $fluentformDefaultGlobalMessages['min_selection'], | |
| 1065 | + 'global_message' => $fluentformDefaultGlobalMessages['min_selection'], | |
| 1066 | + 'global' => true, | |
| 1067 | + ], | |
| 1030 | 1068 | ], |
| 1031 | 1069 | 'conditional_logics' => [], |
| 1032 | 1070 | ], |
| 1033 | 1071 | 'editor_options' => [ |
| @@ -1040,8 +1078,9 @@ | ||
| 1040 | 1078 | 'input_url' => [ |
| 1041 | 1079 | 'index' => 11, |
| 1042 | 1080 | 'element' => 'input_url', |
| 1043 | 1081 | 'attributes' => [ |
| 1082 | + 'autocomplete' => '', | |
| 1044 | 1083 | 'type' => 'url', |
| 1045 | 1084 | 'name' => 'url', |
| 1046 | 1085 | 'value' => '', |
| 1047 | 1086 | 'class' => '', |
| @@ -1080,8 +1119,9 @@ | ||
| 1080 | 1119 | 'input_date' => [ |
| 1081 | 1120 | 'index' => 13, |
| 1082 | 1121 | 'element' => 'input_date', |
| 1083 | 1122 | 'attributes' => [ |
| 1123 | + 'autocomplete' => '', | |
| 1084 | 1124 | 'type' => 'text', |
| 1085 | 1125 | 'name' => 'datetime', |
| 1086 | 1126 | 'value' => '', |
| 1087 | 1127 | 'id' => '', |
| @@ -1409,8 +1449,9 @@ | ||
| 1409 | 1449 | 'input_password' => [ |
| 1410 | 1450 | 'index' => 11, |
| 1411 | 1451 | 'element' => 'input_password', |
| 1412 | 1452 | 'attributes' => [ |
| 1453 | + 'autocomplete' => '', | |
| 1413 | 1454 | 'type' => 'password', |
| 1414 | 1455 | 'name' => 'password', |
| 1415 | 1456 | 'value' => '', |
| 1416 | 1457 | 'id' => '', |
| @@ -1622,9 +1663,9 @@ | ||
| 1622 | 1663 | 'conditional_logics' => [], |
| 1623 | 1664 | 'is_width_auto_calc' => true, |
| 1624 | 1665 | ], |
| 1625 | 1666 | 'columns' => [ |
| 1626 | - ['width' => '', 'left' => '', 'fields' => []], | |
| 1667 | + ['width' => 100, 'left' => '', 'fields' => []], | |
| 1627 | 1668 | ], |
| 1628 | 1669 | 'editor_options' => [ |
| 1629 | 1670 | 'title' => __('One Column Container', 'fluentform'), |
| 1630 | 1671 | 'icon_class' => 'dashicons dashicons-align-center', |