Plugin Directory

Changeset 3450618


Ignore:
Timestamp:
01/30/2026 05:32:26 PM (6 weeks ago)
Author:
griffinforms
Message:

Release 2.1.9.1

Location:
griffinforms-form-builder/trunk
Files:
2 added
15 edited

Legend:

Unmodified
Added
Removed
  • griffinforms-form-builder/trunk/admin/app/html/widgets/presentationarea/formcontrols/inputphone.php

    r3449879 r3450618  
    4242        $select_attributes = $this->getFieldStyleAttributes('select_input');
    4343        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>';
    4545        foreach ($countries as $country) {
    4646            $selected = ($default_code !== '' && $country['dial_code'] === $default_code) ? ' selected' : '';
  • griffinforms-form-builder/trunk/admin/css/app/griffinforms-app-formlayout.css

    r3449879 r3450618  
    6060
    6161#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;
    6566    white-space: nowrap;
    6667    overflow: hidden;
     
    7879    border-top-right-radius: 0 !important;
    7980    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;
    80105}
    81106
  • griffinforms-form-builder/trunk/admin/css/app/griffinforms-app-no-theme.css

    r3449879 r3450618  
    5151
    5252.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;
    5657  white-space: nowrap;
    5758  overflow: hidden;
     
    6768}
    6869
     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
    6994.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group input.form-control[type="tel"] {
    7095  border-top-left-radius: 0 !important;
  • griffinforms-form-builder/trunk/admin/css/overrides.css

    r3449879 r3450618  
    2424
    2525#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%;
    2830  border-right-width: var(--gf-phone-border-width, 1px) !important;
    2931  border-right-style: var(--gf-phone-border-style, solid) !important;
     
    3234  border-top-right-radius: 0 !important;
    3335  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;
    3454}
    3555
     
    4767
    4868#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) {
    4975  margin-left: 0 !important;
    5076}
  • griffinforms-form-builder/trunk/admin/js/app/overrides.js

    r3449879 r3450618  
    187187          var borderColor = styles.borderRightColor;
    188188          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          }
    189199          if (fallbackColor) {
    190200            firstChild[0].style.setProperty('--gf-phone-border-color', fallbackColor);
    191201          }
    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');
    207211        } else {
    208212          applyBorderStyles(firstChild, {
  • griffinforms-form-builder/trunk/blocks/gutenberg/editor.css

    r3449879 r3450618  
    166166}
    167167
     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
    168172.griffinforms-block-editor .griffinforms-block-preview .gf-bp-phone-group .gf-bp-phone-select.gf-bp-control {
    169173    appearance: none !important;
     
    178182}
    179183
     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
    180205
    181206.griffinforms-block-editor .griffinforms-block-preview .gf-bp-textarea {
  • griffinforms-form-builder/trunk/blocks/gutenberg/index.js

    r3449879 r3450618  
    152152                const selectStyleAttrs = ' data-gf-style-group="block-preview" data-gf-style-type="select_input"';
    153153                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>' +
    156156                        samples.map(function(sample) {
    157157                            return '<option>' + formatLabel(sample.flag, sample.code, sample.name) + '</option>';
     
    227227
    228228        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 + '>';
    230231
    231232        if (structure.theme_css) {
  • griffinforms-form-builder/trunk/config.php

    r3449879 r3450618  
    55class Config
    66{
    7     public const VERSION = '2.1.9.0';
     7    public const VERSION = '2.1.9.1';
    88    public const DB_VER = '1.0';
    99    public const PHP_REQUIRED = '8.2';
  • griffinforms-form-builder/trunk/frontend/css/gf-no-theme.css

    r3449879 r3450618  
    3030/* Phone input group sizing for no-theme forms */
    3131.gf-no-theme .griffinforms-phone-input-group .griffinforms-phone-country-select {
    32   flex: 0 0 25% !important;
    33   max-width: 25% !important;
    34   width: 25% !important;
     32  flex: 0 0 28% !important;
     33  max-width: 28% !important;
     34  width: 28% !important;
    3535  white-space: nowrap;
    3636  overflow: hidden;
     
    3838  background-color: rgba(0, 0, 0, 0.05) !important;
    3939}
     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  
    4747
    4848.griffinforms-phone-input-group .griffinforms-phone-country-select {
    49   flex: 0 0 25%;
    50   max-width: 25%;
     49  flex: 0 0 28%;
     50  max-width: 28%;
    5151  min-width: 120px;
    5252  border-right-width: var(--gf-phone-border-width, 1px) !important;
     
    6161}
    6262
     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
    6381.griffinforms-phone-input-group .griffinforms-phone-country-select.form-select {
    6482  appearance: none !important;
  • griffinforms-form-builder/trunk/frontend/html/forms/fields/inputaddress.php

    r3394319 r3450618  
    389389                    countrySelect.val("");
    390390                }
     391                if (!countrySelect.val() && window.GFLocaleUtils && typeof window.GFLocaleUtils.applyDefaults === "function") {
     392                    window.GFLocaleUtils.applyDefaults(container[0]);
     393                }
    391394
    392395                if (cfg.disabled || cfg.readonly) {
  • griffinforms-form-builder/trunk/frontend/html/forms/fields/inputphone.php

    r3449879 r3450618  
    4141        $html  = '<div class="input-group griffinforms-phone-input-group mb-1">';
    4242        $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>';
    4444        foreach ($countries as $country) {
    4545            $selected = ($default_code !== '' && $country['dial_code'] === $default_code) ? ' selected' : '';
  • griffinforms-form-builder/trunk/frontend/views/format.php

    r3394319 r3450618  
    9090    {
    9191        wp_enqueue_script('jquery');
    92    
     92
    9393        $root_url = $this->config->getRootUrl();
    9494        $bootstrap_js_file = $root_url . 'external/bootstrap/js/bootstrap.min.js';
    9595        $frontend_js_file = $root_url . 'frontend/js/frontend.js';
     96        $locale_utils_js_file = $root_url . 'frontend/js/utils/locale.js';
    9697   
    9798        // Enqueue Bootstrap with jQuery dependency and in the footer
    9899        if (!wp_script_is('griffinforms-bootstrap-js', 'enqueued')) {
    99100            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);
    100105        }
    101106   
  • griffinforms-form-builder/trunk/griffinforms.php

    r3449879 r3450618  
    44 * Plugin URI:        https://griffinforms.com/
    55 * 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.0
     6 * Version:           2.1.9.1
    77 * Requires at least: 6.6
    88 * Requires PHP:      8.2
  • griffinforms-form-builder/trunk/readme.txt

    r3449879 r3450618  
    55Tested up to: 6.9
    66Requires PHP: 8.2
    7 Stable tag: 2.1.9.0
     7Stable tag: 2.1.9.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    172172== Changelog ==
    173173
     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 =
     183Improves phone field defaults and layout behavior, especially on narrow layouts. Update recommended.
     184
    174185= 2.1.9.0 – 2026-01-29 =
     186* Feature: Uninstall feedback prompt on deactivation with optional skip, reason capture, and support link.
    175187* Feature: Phone field now includes a country dropdown with dialing codes and display mode options.
    176188* Improvement: Phone validation, formatting, and submissions normalize to E.164 using selected country code.
     
    494506== Upgrade Notice ==
    495507
     508= 2.1.9.1 =
     509Upcoming: locale-aware country selection, improved dropdown sizing, and a clearer divider in the phone field UI.
     510
    496511= 2.1.9.0 =
    497512Adds 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.