Changeset 3450618
- Timestamp:
- 01/30/2026 05:32:26 PM (6 weeks ago)
- Location:
- griffinforms-form-builder/trunk
- Files:
-
- 2 added
- 15 edited
-
admin/app/html/widgets/presentationarea/formcontrols/inputphone.php (modified) (1 diff)
-
admin/css/app/griffinforms-app-formlayout.css (modified) (2 diffs)
-
admin/css/app/griffinforms-app-no-theme.css (modified) (2 diffs)
-
admin/css/overrides.css (modified) (3 diffs)
-
admin/js/app/overrides.js (modified) (1 diff)
-
blocks/gutenberg/editor.css (modified) (2 diffs)
-
blocks/gutenberg/index.js (modified) (2 diffs)
-
config.php (modified) (1 diff)
-
frontend/css/gf-no-theme.css (modified) (2 diffs)
-
frontend/css/themes/overrides.css (modified) (2 diffs)
-
frontend/html/forms/fields/inputaddress.php (modified) (1 diff)
-
frontend/html/forms/fields/inputphone.php (modified) (1 diff)
-
frontend/js/utils (added)
-
frontend/js/utils/locale.js (added)
-
frontend/views/format.php (modified) (1 diff)
-
griffinforms.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
griffinforms-form-builder/trunk/admin/app/html/widgets/presentationarea/formcontrols/inputphone.php
r3449879 r3450618 42 42 $select_attributes = $this->getFieldStyleAttributes('select_input'); 43 43 echo '<select class="form-select griffinforms-phone-country-select" id="' . esc_attr($select_id) . '" data-gf-phone-display-mode="' . esc_attr($display_mode) . '"' . $select_attributes . '>'; 44 echo '<option value="">' . esc_html__(' Select a country', 'griffinforms-form-builder') . '</option>';44 echo '<option value="">' . esc_html__('Country', 'griffinforms-form-builder') . '</option>'; 45 45 foreach ($countries as $country) { 46 46 $selected = ($default_code !== '' && $country['dial_code'] === $default_code) ? ' selected' : ''; -
griffinforms-form-builder/trunk/admin/css/app/griffinforms-app-formlayout.css
r3449879 r3450618 60 60 61 61 #griffinforms-app-presentationarea .griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select { 62 flex: 0 0 9rem !important; 63 max-width: 9rem !important; 64 width: 9rem !important; 62 flex: 0 0 28% !important; 63 max-width: 28% !important; 64 width: 28% !important; 65 min-width: 120px !important; 65 66 white-space: nowrap; 66 67 overflow: hidden; … … 78 79 border-top-right-radius: 0 !important; 79 80 border-bottom-right-radius: 0 !important; 81 } 82 83 #griffinforms-app-presentationarea .griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="flag_code_name"] { 84 flex: 0 0 35% !important; 85 max-width: 35% !important; 86 width: 35% !important; 87 min-width: 140px !important; 88 max-width: 220px !important; 89 } 90 91 #griffinforms-app-presentationarea .griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="flag_code"] { 92 flex: 0 0 28% !important; 93 max-width: 28% !important; 94 width: 28% !important; 95 min-width: 120px !important; 96 max-width: 180px !important; 97 } 98 99 #griffinforms-app-presentationarea .griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="code_only"] { 100 flex: 0 0 16% !important; 101 max-width: 16% !important; 102 width: 16% !important; 103 min-width: 76px !important; 104 max-width: 110px !important; 80 105 } 81 106 -
griffinforms-form-builder/trunk/admin/css/app/griffinforms-app-no-theme.css
r3449879 r3450618 51 51 52 52 .griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select { 53 flex: 0 0 9rem !important; 54 max-width: 9rem !important; 55 width: 9rem !important; 53 flex: 0 0 28% !important; 54 max-width: 28% !important; 55 width: 28% !important; 56 min-width: 120px !important; 56 57 white-space: nowrap; 57 58 overflow: hidden; … … 67 68 } 68 69 70 .griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="flag_code_name"] { 71 flex: 0 0 35% !important; 72 max-width: 35% !important; 73 width: 35% !important; 74 min-width: 140px !important; 75 max-width: 220px !important; 76 } 77 78 .griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="flag_code"] { 79 flex: 0 0 28% !important; 80 max-width: 28% !important; 81 width: 28% !important; 82 min-width: 120px !important; 83 max-width: 180px !important; 84 } 85 86 .griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="code_only"] { 87 flex: 0 0 16% !important; 88 max-width: 16% !important; 89 width: 16% !important; 90 min-width: 76px !important; 91 max-width: 110px !important; 92 } 93 69 94 .griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group input.form-control[type="tel"] { 70 95 border-top-left-radius: 0 !important; -
griffinforms-form-builder/trunk/admin/css/overrides.css
r3449879 r3450618 24 24 25 25 #griffinforms-app-presentationarea .griffinforms-phone-input-group .griffinforms-phone-country-select { 26 flex: 0 0 25%; 27 max-width: 25%; 26 position: relative; 27 z-index: 2; 28 flex: 0 0 28%; 29 max-width: 28%; 28 30 border-right-width: var(--gf-phone-border-width, 1px) !important; 29 31 border-right-style: var(--gf-phone-border-style, solid) !important; … … 32 34 border-top-right-radius: 0 !important; 33 35 border-bottom-right-radius: 0 !important; 36 } 37 38 #griffinforms-app-presentationarea .griffinforms-phone-input-group .griffinforms-phone-country-select[data-gf-phone-display-mode="flag_code_name"] { 39 flex: 0 0 35%; 40 max-width: 35%; 41 min-width: 140px; 42 } 43 44 #griffinforms-app-presentationarea .griffinforms-phone-input-group .griffinforms-phone-country-select[data-gf-phone-display-mode="flag_code"] { 45 flex: 0 0 28%; 46 max-width: 28%; 47 min-width: 120px; 48 } 49 50 #griffinforms-app-presentationarea .griffinforms-phone-input-group .griffinforms-phone-country-select[data-gf-phone-display-mode="code_only"] { 51 flex: 0 0 16%; 52 max-width: 16%; 53 min-width: 76px; 34 54 } 35 55 … … 47 67 48 68 #griffinforms-app-presentationarea .griffinforms-phone-input-group input[type="tel"].form-control { 69 position: relative; 70 z-index: 1; 71 margin-left: 0 !important; 72 } 73 74 #griffinforms-app-presentationarea .griffinforms-phone-input-group > :not(:first-child) { 49 75 margin-left: 0 !important; 50 76 } -
griffinforms-form-builder/trunk/admin/js/app/overrides.js
r3449879 r3450618 187 187 var borderColor = styles.borderRightColor; 188 188 var fallbackColor = borderColor || styles.borderTopColor || styles.borderColor; 189 var fallbackWidth = styles.borderTopWidth; 190 var fallbackStyle = styles.borderTopStyle; 191 var useWidth = (borderWidth && parseFloat(borderWidth) > 0) ? borderWidth : fallbackWidth; 192 var useStyle = (borderStyle && borderStyle !== 'none') ? borderStyle : fallbackStyle; 193 if (!useStyle || useStyle === 'none') { 194 useStyle = 'solid'; 195 } 196 if (!useWidth || parseFloat(useWidth) === 0) { 197 useWidth = '1px'; 198 } 189 199 if (fallbackColor) { 190 200 firstChild[0].style.setProperty('--gf-phone-border-color', fallbackColor); 191 201 } 192 if (borderWidth && parseFloat(borderWidth) > 0 && borderStyle && borderStyle !== 'none') { 193 firstChild[0].style.setProperty('--gf-phone-border-width', borderWidth); 194 firstChild[0].style.setProperty('--gf-phone-border-style', borderStyle); 195 firstChild[0].style.setProperty('--gf-phone-border-color', borderColor); 196 firstChild[0].style.setProperty('border-right-width', borderWidth, 'important'); 197 firstChild[0].style.setProperty('border-right-style', borderStyle, 'important'); 198 firstChild[0].style.setProperty('border-right-color', borderColor, 'important'); 199 } else if (borderStyle && borderStyle !== 'none') { 200 firstChild[0].style.setProperty('border-right-width', '1px', 'important'); 201 firstChild[0].style.setProperty('border-right-style', borderStyle, 'important'); 202 if (fallbackColor) { 203 firstChild[0].style.setProperty('border-right-color', fallbackColor, 'important'); 204 firstChild[0].style.setProperty('box-shadow', 'inset -1px 0 0 ' + fallbackColor, 'important'); 205 } 206 } 202 firstChild[0].style.setProperty('--gf-phone-border-width', useWidth); 203 firstChild[0].style.setProperty('--gf-phone-border-style', useStyle); 204 if (fallbackColor) { 205 firstChild[0].style.setProperty('--gf-phone-border-color', fallbackColor); 206 firstChild[0].style.setProperty('border-right-color', fallbackColor, 'important'); 207 firstChild[0].style.setProperty('box-shadow', 'inset -1px 0 0 ' + fallbackColor, 'important'); 208 } 209 firstChild[0].style.setProperty('border-right-width', useWidth, 'important'); 210 firstChild[0].style.setProperty('border-right-style', useStyle, 'important'); 207 211 } else { 208 212 applyBorderStyles(firstChild, { -
griffinforms-form-builder/trunk/blocks/gutenberg/editor.css
r3449879 r3450618 166 166 } 167 167 168 .griffinforms-block-editor .griffinforms-block-preview.gf-bp-no-theme .gf-bp-phone-group .gf-bp-phone-input.gf-bp-control { 169 margin-left: 0 !important; 170 } 171 168 172 .griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group .gf-bp-phone-select.gf-bp-control { 169 173 appearance: none !important; … … 178 182 } 179 183 184 .griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group .gf-bp-phone-select.gf-bp-control[data-gf-phone-display-mode="flag_code_name"] { 185 flex: 0 0 35% !important; 186 width: 35% !important; 187 min-width: 140px !important; 188 max-width: 220px !important; 189 } 190 191 .griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group .gf-bp-phone-select.gf-bp-control[data-gf-phone-display-mode="flag_code"] { 192 flex: 0 0 28% !important; 193 width: 28% !important; 194 min-width: 120px !important; 195 max-width: 180px !important; 196 } 197 198 .griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group .gf-bp-phone-select.gf-bp-control[data-gf-phone-display-mode="code_only"] { 199 flex: 0 0 16% !important; 200 width: 16% !important; 201 min-width: 76px !important; 202 max-width: 110px !important; 203 } 204 180 205 181 206 .griffinforms-block-editor .griffinforms-block-preview .gf-bp-textarea { -
griffinforms-form-builder/trunk/blocks/gutenberg/index.js
r3449879 r3450618 152 152 const selectStyleAttrs = ' data-gf-style-group="block-preview" data-gf-style-type="select_input"'; 153 153 return '<div class="gf-bp-phone-group" style="display:flex;gap:0;">' + 154 '<select class="gf-bp-control gf-bp-select gf-bp-phone-select"' + selectStyleAttrs + ' style="width:30%;min-width:120px;border-right:0;border-radius:4px 0 0 4px;border-top-right-radius:0;border-bottom-right-radius:0;">' +155 '<option>' + esc(__(' Select a country (sample)', 'griffinforms-form-builder')) + '</option>' +154 '<select class="gf-bp-control gf-bp-select gf-bp-phone-select"' + selectStyleAttrs + ' data-gf-phone-display-mode="' + displayMode + '" style="border-radius:4px 0 0 4px;border-top-right-radius:0;border-bottom-right-radius:0;">' + 155 '<option>' + esc(__('Country', 'griffinforms-form-builder')) + '</option>' + 156 156 samples.map(function(sample) { 157 157 return '<option>' + formatLabel(sample.flag, sample.code, sample.name) + '</option>'; … … 227 227 228 228 const formStyle = structure.form_style_css ? ' style="' + esc(structure.form_style_css) + '"' : ''; 229 let html = '<div class="griffinforms-block-preview"' + formStyle + '>'; 229 const previewClass = 'griffinforms-block-preview' + (structure.theme_css ? ' gf-bp-theme' : ' gf-bp-no-theme'); 230 let html = '<div class="' + previewClass + '"' + formStyle + '>'; 230 231 231 232 if (structure.theme_css) { -
griffinforms-form-builder/trunk/config.php
r3449879 r3450618 5 5 class Config 6 6 { 7 public const VERSION = '2.1.9. 0';7 public const VERSION = '2.1.9.1'; 8 8 public const DB_VER = '1.0'; 9 9 public const PHP_REQUIRED = '8.2'; -
griffinforms-form-builder/trunk/frontend/css/gf-no-theme.css
r3449879 r3450618 30 30 /* Phone input group sizing for no-theme forms */ 31 31 .gf-no-theme .griffinforms-phone-input-group .griffinforms-phone-country-select { 32 flex: 0 0 2 5% !important;33 max-width: 2 5% !important;34 width: 2 5% !important;32 flex: 0 0 28% !important; 33 max-width: 28% !important; 34 width: 28% !important; 35 35 white-space: nowrap; 36 36 overflow: hidden; … … 38 38 background-color: rgba(0, 0, 0, 0.05) !important; 39 39 } 40 41 .gf-no-theme .griffinforms-phone-input-group .griffinforms-phone-country-select[data-gf-phone-display-mode="flag_code_name"] { 42 flex: 0 0 35% !important; 43 max-width: 35% !important; 44 width: 35% !important; 45 min-width: 140px !important; 46 } 47 48 .gf-no-theme .griffinforms-phone-input-group .griffinforms-phone-country-select[data-gf-phone-display-mode="flag_code"] { 49 flex: 0 0 28% !important; 50 max-width: 28% !important; 51 width: 28% !important; 52 min-width: 120px !important; 53 } 54 55 .gf-no-theme .griffinforms-phone-input-group .griffinforms-phone-country-select[data-gf-phone-display-mode="code_only"] { 56 flex: 0 0 16% !important; 57 max-width: 16% !important; 58 width: 16% !important; 59 min-width: 76px !important; 60 } -
griffinforms-form-builder/trunk/frontend/css/themes/overrides.css
r3449879 r3450618 47 47 48 48 .griffinforms-phone-input-group .griffinforms-phone-country-select { 49 flex: 0 0 2 5%;50 max-width: 2 5%;49 flex: 0 0 28%; 50 max-width: 28%; 51 51 min-width: 120px; 52 52 border-right-width: var(--gf-phone-border-width, 1px) !important; … … 61 61 } 62 62 63 .griffinforms-phone-input-group .griffinforms-phone-country-select[data-gf-phone-display-mode="flag_code_name"] { 64 flex: 0 0 35%; 65 max-width: 35%; 66 min-width: 140px; 67 } 68 69 .griffinforms-phone-input-group .griffinforms-phone-country-select[data-gf-phone-display-mode="flag_code"] { 70 flex: 0 0 28%; 71 max-width: 28%; 72 min-width: 120px; 73 } 74 75 .griffinforms-phone-input-group .griffinforms-phone-country-select[data-gf-phone-display-mode="code_only"] { 76 flex: 0 0 16%; 77 max-width: 16%; 78 min-width: 76px; 79 } 80 63 81 .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select { 64 82 appearance: none !important; -
griffinforms-form-builder/trunk/frontend/html/forms/fields/inputaddress.php
r3394319 r3450618 389 389 countrySelect.val(""); 390 390 } 391 if (!countrySelect.val() && window.GFLocaleUtils && typeof window.GFLocaleUtils.applyDefaults === "function") { 392 window.GFLocaleUtils.applyDefaults(container[0]); 393 } 391 394 392 395 if (cfg.disabled || cfg.readonly) { -
griffinforms-form-builder/trunk/frontend/html/forms/fields/inputphone.php
r3449879 r3450618 41 41 $html = '<div class="input-group griffinforms-phone-input-group mb-1">'; 42 42 $html .= '<select class="form-select griffinforms-phone-country-select" id="' . esc_attr($select_id) . '" data-gf-phone-display-mode="' . esc_attr($display_mode) . '"' . $select_disabled . '>'; 43 $html .= '<option value="">' . esc_html ($this->lang->getText('address_country_placeholder')) . '</option>';43 $html .= '<option value="">' . esc_html__('Country', 'griffinforms-form-builder') . '</option>'; 44 44 foreach ($countries as $country) { 45 45 $selected = ($default_code !== '' && $country['dial_code'] === $default_code) ? ' selected' : ''; -
griffinforms-form-builder/trunk/frontend/views/format.php
r3394319 r3450618 90 90 { 91 91 wp_enqueue_script('jquery'); 92 92 93 93 $root_url = $this->config->getRootUrl(); 94 94 $bootstrap_js_file = $root_url . 'external/bootstrap/js/bootstrap.min.js'; 95 95 $frontend_js_file = $root_url . 'frontend/js/frontend.js'; 96 $locale_utils_js_file = $root_url . 'frontend/js/utils/locale.js'; 96 97 97 98 // Enqueue Bootstrap with jQuery dependency and in the footer 98 99 if (!wp_script_is('griffinforms-bootstrap-js', 'enqueued')) { 99 100 wp_enqueue_script('griffinforms-bootstrap-js', $bootstrap_js_file, ['jquery'], '5.3.0', true); 101 } 102 103 if (!wp_script_is('griffinforms-locale-utils', 'enqueued')) { 104 wp_enqueue_script('griffinforms-locale-utils', $locale_utils_js_file, [], '1.0.0', true); 100 105 } 101 106 -
griffinforms-form-builder/trunk/griffinforms.php
r3449879 r3450618 4 4 * Plugin URI: https://griffinforms.com/ 5 5 * Description: A powerful and flexible form builder for WordPress. Create multi-page forms with drag-and-drop ease, custom validations, and full submission management. 6 * Version: 2.1.9. 06 * Version: 2.1.9.1 7 7 * Requires at least: 6.6 8 8 * Requires PHP: 8.2 -
griffinforms-form-builder/trunk/readme.txt
r3449879 r3450618 5 5 Tested up to: 6.9 6 6 Requires PHP: 8.2 7 Stable tag: 2.1.9. 07 Stable tag: 2.1.9.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 172 172 == Changelog == 173 173 174 = 2.1.9.1 – 2026-01-30 = 175 * Improvement: Auto-select phone country based on browser locale when no selection is set (phone + address). 176 * Improvement: Phone country dropdown width now adapts to display mode (flag + code + name vs code-only). 177 * Fix: Divider visibility between phone dropdown and number input in the form builder. 178 * Fix: Narrow layouts no longer push the phone dropdown/input onto separate rows. 179 180 == Upgrade Notice == 181 182 = 2.1.9.1 = 183 Improves phone field defaults and layout behavior, especially on narrow layouts. Update recommended. 184 174 185 = 2.1.9.0 – 2026-01-29 = 186 * Feature: Uninstall feedback prompt on deactivation with optional skip, reason capture, and support link. 175 187 * Feature: Phone field now includes a country dropdown with dialing codes and display mode options. 176 188 * Improvement: Phone validation, formatting, and submissions normalize to E.164 using selected country code. … … 494 506 == Upgrade Notice == 495 507 508 = 2.1.9.1 = 509 Upcoming: locale-aware country selection, improved dropdown sizing, and a clearer divider in the phone field UI. 510 496 511 = 2.1.9.0 = 497 512 Adds an uninstall feedback prompt and upgrades the phone field with country selection + E.164 normalization. Recommended update.
Note: See TracChangeset
for help on using the changeset viewer.