Plugin Directory

Changeset 3379239


Ignore:
Timestamp:
10/16/2025 06:11:11 AM (2 months ago)
Author:
coolplugins
Message:

Update to version 2.5.7 from GitHub

Location:
form-masks-for-elementor
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • form-masks-for-elementor/tags/2.5.7/assets/js/custom-mask-script.js

    r3359005 r3379239  
    369369      $(document).on("blur", selector, function () {
    370370        var input = $(this);
     371       
     372        if(input.hasClass("hide-fme-mask-input")){
     373          return;
     374        }
     375
    371376        var val = input.val();
    372377        var errorElement = input
     
    872877
    873878        if(recaptchaEvent[widgetId]){
    874 
    875           recaptchaEvent[widgetId].forEach(fn => {
    876                   submtBtnTag.one("click", fn); // use .one instead of .on
    877                 });
     879              submtBtnTag.on("click", recaptchaEvent[widgetId]);
    878880        }
    879881
     
    10181020
    10191021
    1020       if(previousBtn.length && inputMaskFields.length && maskErrorArr[widgetId].length){
     1022      if(previousBtn && previousBtn.length && inputMaskFields && inputMaskFields.length && maskErrorArr[widgetId] && maskErrorArr[widgetId].length){
    10211023
    10221024        var $subBtnTag = $submitBtn.find("button");
     
    10301032
    10311033
    1032       if(!recaptchaEvent[widgetId]){
    1033 
    1034         recaptchaEvent[widgetId]  = origninalclick && origninalclick.click ? origninalclick.click.map(h => h.handler) : [];
    1035       }
    1036 
    1037 
    1038 
     1034      if(origninalclick && origninalclick.click){
     1035
     1036            origninalclick.click.forEach((ele) => {
     1037            if(ele.handler.toString().trim().includes("onV3FormSubmit")){
     1038
     1039              if(!recaptchaEvent[widgetId]){
     1040
     1041                recaptchaEvent[widgetId] = ele.handler;
     1042
     1043              }
     1044
     1045            }
     1046          })
     1047
     1048      }
    10391049
    10401050      // getting form apply step events
     
    10421052      const origninalSubmit = jQuery._data($form[0], "events");
    10431053
    1044       origninalSubmit.submit.forEach((ele) => {
    1045         if(ele.handler.toString().trim().includes("resetForm")){
    1046 
    1047           if(!submitBtnEvent[widgetId]){
    1048 
    1049             submitBtnEvent[widgetId] = ele.handler;
    1050 
     1054      if(origninalSubmit && origninalSubmit.submit){
     1055
     1056        origninalSubmit.submit.forEach((ele) => {
     1057          if(ele.handler.toString().trim().includes("resetForm")){
     1058 
     1059            if(!submitBtnEvent[widgetId]){
     1060 
     1061              submitBtnEvent[widgetId] = ele.handler;
     1062 
     1063            }
     1064 
    10511065          }
    1052 
    1053         }
    1054       })
    1055 
    1056 
    1057 
    1058       // removing form apply step event
    1059       $form.off("submit", submitBtnEvent[widgetId]);
    1060 
    1061       // removing submit button click events
    1062       $subBtnTag.off("click");
     1066        })
     1067      }
     1068
     1069      if(submitBtnEvent[widgetId]){
     1070          // removing form apply step event
     1071          $form.off("submit", submitBtnEvent[widgetId]);
     1072      }
     1073
     1074
     1075      if(recaptchaEvent[widgetId]){
     1076          // removing submit button click events
     1077          $subBtnTag.off("click", recaptchaEvent[widgetId]);
     1078      }
    10631079
    10641080
     
    10741090
    10751091      var $submitBtn = $(this);
    1076 
    1077        var $subBtnTag = $submitBtn.find("button");
    1078 
    10791092
    10801093      if ($submitBtn.find('button').hasClass('cfkef-prevent-submit') || $submitBtn.find('button').hasClass('confirmation-pending')
     
    10831096      }
    10841097
    1085       var $submitBtn = $(this);
    10861098      var $form = $submitBtn.closest("form");
    10871099
     1100      const closesWidget = $form.closest(".elementor-widget-form");
     1101      const widgetId = closesWidget.data('id');
     1102      const submtBtnTag = $form.find("button[type='submit']");
    10881103
    10891104      // Prevent double-clicks
     
    11001115      $form[0].classList.add("elementor-form-waiting");
    11011116
    1102       // e.preventDefault(); // Prevent default form submission
    1103 
    11041117      // Wait for mask errors or blur logic to complete
    11051118      setTimeout(() => {
    1106 
    1107 
    11081119        let hasVisibleMaskError = false;
    11091120
     
    11111122        const $errors = $form.find(".mask-error").filter(function () {
    11121123          return $(this).text().trim() !== "" && $(this).css("display") == "flex";
    1113         });
    1114 
    1115         if ($errors.length > 0) {
    1116           hasVisibleMaskError = true;
    1117           const $firstError = $errors.first();
    1118           $("html, body").animate({
    1119             scrollTop: $firstError.offset().top - 200
    1120           }, 300);
    1121         }
    1122 
    1123         // ✅ Check for empty required masked fields
    1124         const $emptyRequiredMasked = $form.find("input[required]").filter(function () {
     1124      });
     1125
     1126      if ($errors.length > 0) {
     1127        hasVisibleMaskError = true;
     1128        const $firstError = $errors.first();
     1129        $("html, body").animate({
     1130          scrollTop: $firstError.offset().top - 200
     1131        }, 300);
     1132      }
     1133
     1134      // ✅ Check for empty required masked fields
     1135      const $emptyRequiredMasked = $form.find("input[required]").filter(function () {
     1136        if(!$(this).hasClass('hide-fme-mask-input')){
    11251137          const val = $(this).val().trim();
    11261138          const isVisible = $(this).css("display") == "flex";
    11271139          return (val === "" || /^[\s_\-\(\)\.:/]+$/.test(val));
    1128         });
    1129 
    1130 
    1131         if ($emptyRequiredMasked.length > 0) {
    1132           hasVisibleMaskError = true;
    1133           const $firstEmpty = $emptyRequiredMasked.first();
    1134           $("html, body").animate({
    1135             scrollTop: $firstEmpty.offset().top - 200
    1136           }, 300);
    1137           $firstEmpty.focus();
    1138         }
    1139 
    1140         // ❌ Validation failed
    1141         if (hasVisibleMaskError) {
    1142           // $form[0].classList.remove("elementor-form-waiting");
     1140        }
     1141      });
     1142
     1143      if ($emptyRequiredMasked.length > 0) {
     1144        hasVisibleMaskError = true;
     1145        const $firstEmpty = $emptyRequiredMasked.first();
     1146        $("html, body").animate({
     1147          scrollTop: $firstEmpty.offset().top - 200
     1148        }, 300);
     1149        $firstEmpty.focus();
     1150      }
     1151
     1152      // ❌ Validation failed
     1153      if (hasVisibleMaskError) {
     1154        // $form[0].classList.remove("elementor-form-waiting");
     1155        $submitBtn.data("clicked", false);
     1156        e.preventDefault();
     1157        return;
     1158      }
     1159
     1160      // ❌ Validation failed
     1161      if (hasVisibleMaskError) {
     1162        // $form[0].classList.remove("elementor-form-waiting");
     1163        $submitBtn.data("clicked", false);
     1164        e.preventDefault();
     1165        return;
     1166      }
     1167
     1168      if (!hasVisibleMaskError) {
     1169        // ✅ All good — submit the form
     1170
     1171
     1172        if(recaptchaEvent[widgetId]){
     1173          submtBtnTag.on("click", recaptchaEvent[widgetId]);
     1174          submtBtnTag.trigger("click");
     1175        }
     1176
     1177        if(submitBtnEvent[widgetId]){
     1178          $form.on("submit", submitBtnEvent[widgetId]);
     1179          submtBtnTag.trigger("click");
     1180
     1181        }
     1182
     1183        $form[0].classList.remove("elementor-form-waiting");
    11431184          $submitBtn.data("clicked", false);
    1144           e.preventDefault();
    1145           return;
    1146         }
    1147 
    1148         if (!hasVisibleMaskError) {
    1149           // ✅ All good — submit the form
    1150           $form[0].classList.remove("elementor-form-waiting");
    1151           $submitBtn.data("clicked", false);
    1152           $submitBtn.trigger("submit");
    1153         }
     1185          if(!recaptchaEvent[widgetId]){
     1186
     1187            let error_messages = $form.find('.elementor-form-fields-wrapper').find('.elementor-message');
     1188
     1189            if(error_messages && error_messages.length == 0){
     1190
     1191              $form[0].requestSubmit();
     1192            }
     1193
     1194
     1195          }
     1196      }
    11541197
    11551198      }, 500);
  • form-masks-for-elementor/tags/2.5.7/form-masks-for-elementor.php

    r3364326 r3379239  
    66 * Author: Cool Plugins
    77 * Author URI: https://coolplugins.net/?utm_source=fim_plugin&utm_medium=inside&utm_campaign=author_page&utm_content=plugins_list
    8  * Version: 2.5.6
     8 * Version: 2.5.7
    99 * Requires at least: 5.5
    1010 * Requires PHP: 7.4
     
    1313 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
    1414 * Requires Plugins: elementor
    15  * Elementor tested up to: 3.32.2
    16  * Elementor Pro tested up to: 3.32.1
     15 * Elementor tested up to: 3.32.4
     16 * Elementor Pro tested up to: 3.32.2
    1717 */
    1818
     
    2323}
    2424
    25 define( 'FME_VERSION', '2.5.6' );
     25define( 'FME_VERSION', '2.5.7' );
    2626define( 'FME_FILE', __FILE__ );
    2727define( 'FME_PLUGIN_BASE', plugin_basename( FME_FILE ) );
  • form-masks-for-elementor/tags/2.5.7/readme.txt

    r3364344 r3379239  
    66Tested up to: 6.8.2
    77Requires PHP: 7.2
    8 Stable tag: 2.5.6
     8Stable tag: 2.5.7
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    11 Elementor tested up to: 3.32.2
    12 Elementor Pro tested up to: 3.32.1
     11Elementor tested up to: 3.32.4
     12Elementor Pro tested up to: 3.32.2
    1313
    1414Add input masks to Elementor Pro or Hello Plus form fields - phone, date, time, credit card, CPF, CNPJ, CEP & more for accurate entries.
     
    192192== Changelog ==
    193193
     194= 2.5.7 - Oct 16, 2025 =
     195- Fixed: - form submission issue with required hidden mask field.
     196
    194197= 2.5.6 - Sep 19, 2025 =
    195198- Added: - Added other plugin recommendations for Pro Elements users.
  • form-masks-for-elementor/trunk/assets/js/custom-mask-script.js

    r3359005 r3379239  
    369369      $(document).on("blur", selector, function () {
    370370        var input = $(this);
     371       
     372        if(input.hasClass("hide-fme-mask-input")){
     373          return;
     374        }
     375
    371376        var val = input.val();
    372377        var errorElement = input
     
    872877
    873878        if(recaptchaEvent[widgetId]){
    874 
    875           recaptchaEvent[widgetId].forEach(fn => {
    876                   submtBtnTag.one("click", fn); // use .one instead of .on
    877                 });
     879              submtBtnTag.on("click", recaptchaEvent[widgetId]);
    878880        }
    879881
     
    10181020
    10191021
    1020       if(previousBtn.length && inputMaskFields.length && maskErrorArr[widgetId].length){
     1022      if(previousBtn && previousBtn.length && inputMaskFields && inputMaskFields.length && maskErrorArr[widgetId] && maskErrorArr[widgetId].length){
    10211023
    10221024        var $subBtnTag = $submitBtn.find("button");
     
    10301032
    10311033
    1032       if(!recaptchaEvent[widgetId]){
    1033 
    1034         recaptchaEvent[widgetId]  = origninalclick && origninalclick.click ? origninalclick.click.map(h => h.handler) : [];
    1035       }
    1036 
    1037 
    1038 
     1034      if(origninalclick && origninalclick.click){
     1035
     1036            origninalclick.click.forEach((ele) => {
     1037            if(ele.handler.toString().trim().includes("onV3FormSubmit")){
     1038
     1039              if(!recaptchaEvent[widgetId]){
     1040
     1041                recaptchaEvent[widgetId] = ele.handler;
     1042
     1043              }
     1044
     1045            }
     1046          })
     1047
     1048      }
    10391049
    10401050      // getting form apply step events
     
    10421052      const origninalSubmit = jQuery._data($form[0], "events");
    10431053
    1044       origninalSubmit.submit.forEach((ele) => {
    1045         if(ele.handler.toString().trim().includes("resetForm")){
    1046 
    1047           if(!submitBtnEvent[widgetId]){
    1048 
    1049             submitBtnEvent[widgetId] = ele.handler;
    1050 
     1054      if(origninalSubmit && origninalSubmit.submit){
     1055
     1056        origninalSubmit.submit.forEach((ele) => {
     1057          if(ele.handler.toString().trim().includes("resetForm")){
     1058 
     1059            if(!submitBtnEvent[widgetId]){
     1060 
     1061              submitBtnEvent[widgetId] = ele.handler;
     1062 
     1063            }
     1064 
    10511065          }
    1052 
    1053         }
    1054       })
    1055 
    1056 
    1057 
    1058       // removing form apply step event
    1059       $form.off("submit", submitBtnEvent[widgetId]);
    1060 
    1061       // removing submit button click events
    1062       $subBtnTag.off("click");
     1066        })
     1067      }
     1068
     1069      if(submitBtnEvent[widgetId]){
     1070          // removing form apply step event
     1071          $form.off("submit", submitBtnEvent[widgetId]);
     1072      }
     1073
     1074
     1075      if(recaptchaEvent[widgetId]){
     1076          // removing submit button click events
     1077          $subBtnTag.off("click", recaptchaEvent[widgetId]);
     1078      }
    10631079
    10641080
     
    10741090
    10751091      var $submitBtn = $(this);
    1076 
    1077        var $subBtnTag = $submitBtn.find("button");
    1078 
    10791092
    10801093      if ($submitBtn.find('button').hasClass('cfkef-prevent-submit') || $submitBtn.find('button').hasClass('confirmation-pending')
     
    10831096      }
    10841097
    1085       var $submitBtn = $(this);
    10861098      var $form = $submitBtn.closest("form");
    10871099
     1100      const closesWidget = $form.closest(".elementor-widget-form");
     1101      const widgetId = closesWidget.data('id');
     1102      const submtBtnTag = $form.find("button[type='submit']");
    10881103
    10891104      // Prevent double-clicks
     
    11001115      $form[0].classList.add("elementor-form-waiting");
    11011116
    1102       // e.preventDefault(); // Prevent default form submission
    1103 
    11041117      // Wait for mask errors or blur logic to complete
    11051118      setTimeout(() => {
    1106 
    1107 
    11081119        let hasVisibleMaskError = false;
    11091120
     
    11111122        const $errors = $form.find(".mask-error").filter(function () {
    11121123          return $(this).text().trim() !== "" && $(this).css("display") == "flex";
    1113         });
    1114 
    1115         if ($errors.length > 0) {
    1116           hasVisibleMaskError = true;
    1117           const $firstError = $errors.first();
    1118           $("html, body").animate({
    1119             scrollTop: $firstError.offset().top - 200
    1120           }, 300);
    1121         }
    1122 
    1123         // ✅ Check for empty required masked fields
    1124         const $emptyRequiredMasked = $form.find("input[required]").filter(function () {
     1124      });
     1125
     1126      if ($errors.length > 0) {
     1127        hasVisibleMaskError = true;
     1128        const $firstError = $errors.first();
     1129        $("html, body").animate({
     1130          scrollTop: $firstError.offset().top - 200
     1131        }, 300);
     1132      }
     1133
     1134      // ✅ Check for empty required masked fields
     1135      const $emptyRequiredMasked = $form.find("input[required]").filter(function () {
     1136        if(!$(this).hasClass('hide-fme-mask-input')){
    11251137          const val = $(this).val().trim();
    11261138          const isVisible = $(this).css("display") == "flex";
    11271139          return (val === "" || /^[\s_\-\(\)\.:/]+$/.test(val));
    1128         });
    1129 
    1130 
    1131         if ($emptyRequiredMasked.length > 0) {
    1132           hasVisibleMaskError = true;
    1133           const $firstEmpty = $emptyRequiredMasked.first();
    1134           $("html, body").animate({
    1135             scrollTop: $firstEmpty.offset().top - 200
    1136           }, 300);
    1137           $firstEmpty.focus();
    1138         }
    1139 
    1140         // ❌ Validation failed
    1141         if (hasVisibleMaskError) {
    1142           // $form[0].classList.remove("elementor-form-waiting");
     1140        }
     1141      });
     1142
     1143      if ($emptyRequiredMasked.length > 0) {
     1144        hasVisibleMaskError = true;
     1145        const $firstEmpty = $emptyRequiredMasked.first();
     1146        $("html, body").animate({
     1147          scrollTop: $firstEmpty.offset().top - 200
     1148        }, 300);
     1149        $firstEmpty.focus();
     1150      }
     1151
     1152      // ❌ Validation failed
     1153      if (hasVisibleMaskError) {
     1154        // $form[0].classList.remove("elementor-form-waiting");
     1155        $submitBtn.data("clicked", false);
     1156        e.preventDefault();
     1157        return;
     1158      }
     1159
     1160      // ❌ Validation failed
     1161      if (hasVisibleMaskError) {
     1162        // $form[0].classList.remove("elementor-form-waiting");
     1163        $submitBtn.data("clicked", false);
     1164        e.preventDefault();
     1165        return;
     1166      }
     1167
     1168      if (!hasVisibleMaskError) {
     1169        // ✅ All good — submit the form
     1170
     1171
     1172        if(recaptchaEvent[widgetId]){
     1173          submtBtnTag.on("click", recaptchaEvent[widgetId]);
     1174          submtBtnTag.trigger("click");
     1175        }
     1176
     1177        if(submitBtnEvent[widgetId]){
     1178          $form.on("submit", submitBtnEvent[widgetId]);
     1179          submtBtnTag.trigger("click");
     1180
     1181        }
     1182
     1183        $form[0].classList.remove("elementor-form-waiting");
    11431184          $submitBtn.data("clicked", false);
    1144           e.preventDefault();
    1145           return;
    1146         }
    1147 
    1148         if (!hasVisibleMaskError) {
    1149           // ✅ All good — submit the form
    1150           $form[0].classList.remove("elementor-form-waiting");
    1151           $submitBtn.data("clicked", false);
    1152           $submitBtn.trigger("submit");
    1153         }
     1185          if(!recaptchaEvent[widgetId]){
     1186
     1187            let error_messages = $form.find('.elementor-form-fields-wrapper').find('.elementor-message');
     1188
     1189            if(error_messages && error_messages.length == 0){
     1190
     1191              $form[0].requestSubmit();
     1192            }
     1193
     1194
     1195          }
     1196      }
    11541197
    11551198      }, 500);
  • form-masks-for-elementor/trunk/form-masks-for-elementor.php

    r3364326 r3379239  
    66 * Author: Cool Plugins
    77 * Author URI: https://coolplugins.net/?utm_source=fim_plugin&utm_medium=inside&utm_campaign=author_page&utm_content=plugins_list
    8  * Version: 2.5.6
     8 * Version: 2.5.7
    99 * Requires at least: 5.5
    1010 * Requires PHP: 7.4
     
    1313 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
    1414 * Requires Plugins: elementor
    15  * Elementor tested up to: 3.32.2
    16  * Elementor Pro tested up to: 3.32.1
     15 * Elementor tested up to: 3.32.4
     16 * Elementor Pro tested up to: 3.32.2
    1717 */
    1818
     
    2323}
    2424
    25 define( 'FME_VERSION', '2.5.6' );
     25define( 'FME_VERSION', '2.5.7' );
    2626define( 'FME_FILE', __FILE__ );
    2727define( 'FME_PLUGIN_BASE', plugin_basename( FME_FILE ) );
  • form-masks-for-elementor/trunk/readme.txt

    r3364344 r3379239  
    66Tested up to: 6.8.2
    77Requires PHP: 7.2
    8 Stable tag: 2.5.6
     8Stable tag: 2.5.7
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    11 Elementor tested up to: 3.32.2
    12 Elementor Pro tested up to: 3.32.1
     11Elementor tested up to: 3.32.4
     12Elementor Pro tested up to: 3.32.2
    1313
    1414Add input masks to Elementor Pro or Hello Plus form fields - phone, date, time, credit card, CPF, CNPJ, CEP & more for accurate entries.
     
    192192== Changelog ==
    193193
     194= 2.5.7 - Oct 16, 2025 =
     195- Fixed: - form submission issue with required hidden mask field.
     196
    194197= 2.5.6 - Sep 19, 2025 =
    195198- Added: - Added other plugin recommendations for Pro Elements users.
Note: See TracChangeset for help on using the changeset viewer.