CF7 form optional fields | WordPress.org

[ad_1]

We have found issue on submission of form. When we are submitting form with out filing the optional fields, the GTM script is not adding the form into window.dataLayer instead on console it says ‘input is empty!

So please update the code where this data Layer pushing is being triggered and add additional condition for the input fields

like this:

if ("" == formInputs[a].value.replace(/^\s+|\s+$/g, "") && formInputs[a].getAttribute('aria-required')) 
console.log("input is empty!");
b = !0;
break

Hope we can get these changes ASAP

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer