-
AuthorPosts
-
February 23, 2022 at 2:02 pm #1342001
Hi all,
Contact form is only sent at the 2nd click if a postal code field with validation “Valid positive number including 0” is set. WP 5.9.1, Enfold 4.9February 23, 2022 at 7:57 pm #1342053Hey Winter,
Thanks for contacting us!
I just tested it on my local installation and it worked.
Could you please create temporary admin logins and post them here privately so we can look into it? :)
Best regards,
YigitFebruary 24, 2022 at 10:15 am #1342129Hi Yigit,
the problem exists on several websites.
Login data attached.
Thank youFebruary 24, 2022 at 9:46 pm #1342184Hi,
I see an error in contact.js file. Could you please post FTP logins here privately as well? Also, can we temporarily de-activate all active plugins for testing purposes?
Best regards,
YigitFebruary 25, 2022 at 9:23 am #1342244Hi,
I wonder why it should be because of this file, since they are the original files. Of course, the plugins can be temporarily disabled.
Login data attached.Best regards
February 28, 2022 at 4:09 pm #1342576Hi,
Thank you for the information.
Error is there even when reCaptcha is disabled but it sends the mail in first click when no captcha and Enfold numeric captcha options are selected. Double click seems to be needed for reCaptcha V2 and V3.
I reported the issue to our devs and we will update you here. Please consider using Enfold Numeric Captcha in the meantime.
Best regards,
YigitFebruary 28, 2022 at 6:37 pm #1342597Hi Yigit,
thanks for the feedback and review. Waiting for an update so that it works again with reCaptcha.
Best regards
March 1, 2022 at 5:08 am #1342635Hi,
We created a test page (see private field), enabled recaptcha for the contact form and got the same error that @yigit mentioned above. The error occurs because the function that is supposed to validate the postal code field or the number field does not exists in the front end.
To fix the issue temporarily, please edit enfold/config-templatebuilder/avia-shortcodes/contact/contact.js file, around line 159 look for this code.
if( ! ( avia_isNumeric( value ) ) || value == "" || value < 0 )
.. and replace it with..
function is_numeric( obj ) { var type = typeof obj; return ( type === "number" || type === "string" ) && ! isNaN( obj - parseFloat( obj ) ); } if( ! ( is_numeric( value ) ) || value == "" || value < 0 )
Please toggle or temporarily disable the Enfold > Performance > File Compression settings after editing the file.
Best regards,
IsmaelMarch 1, 2022 at 2:36 pm #1342715Hi Ismael,
It works with the change. But shows in line 159 ERROR: Move function declaration to function body root. [no-inner-declarations]. Will this error be fixed in the next version?
Best regards
March 1, 2022 at 2:42 pm #1342716Hey,
Yes, it will be fixed in upcoming version.
If you would like to apply the fix, please replace /enfold/config-teCplatebuilder/avia-shortcodes/contact/contact.js file with this one – https://pastebin.com/4xgTwrbv in Appearance > Editor.
If you would like us to update the file, please create temporary admin logins once again and post them here privately :)
Cheers!
YigitMarch 1, 2022 at 2:56 pm #1342718Hi Yigit,
Have replaced the file. The error message in the script has disappeared.
Thanks for the help.March 1, 2022 at 3:15 pm #1342720Hi,
You are welcome and thanks for your feedback :)
For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/
If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)
Enjoy the rest of your day!
Best regards,
Yigit -
AuthorPosts
- The topic ‘Contact form validation error’ is closed to new replies.