Form Error when I export

Hi everyone
I truly grateful to this community for all the support!
I have an issue when I build the Wordpress theme using webflow code export, about the form element I create in webflow, in the WordPress will show error popup like this:
Oops! This page has improperly configured forms. Please contact your website administrator to fix this issue.
How can I fix this?

I try to add this in webflow.js but doesn’t work.

function init() {
  return; // <---------- add this line
  siteId = $('html').attr('data-wf-site');

  $forms = $(namespace + ' form');
  if (!$forms.length) return;
  $forms.each(build);
}

Thank you so much!

My HTML code(this is the webflow export version):

<div data-w-id="13d89fc0-978c-a5d7-5dd8-14091d73373b" class="div-block-40 modal">
  <div class="div-block-41 w-clearfix">
    <a href="#" data-w-id="1e88e741-8e04-a4f0-8cfd-af6dd85518f7" class="link-11">Close X</a>
    <h1 class="heading-19">Sign up for goodies</h1>
    <p class="paragraph-16">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus
      id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.</p>
    <div class="w-form">
      <form id="email-form-2" name="email-form-2" data-name="Email Form 2">
        <label for="name-3" class="field-label-7">Name:</label>
        <input type="text" class="w-input" maxlength="256" name="name-2" data-name="Name 2" id="name-2">
        <label for="email-3" class="field-label-8">Email Address:</label>
        <input type="text" class="w-input" maxlength="256" name="email-2" data-name="Email 2" id="email-2" required="">
        <input type="submit" value="JOIN ME" data-wait="Please wait..." class="submit-button-4 w-button">
        <p class="paragraph-16">No Spam, just some good info you would like.</p>
      </form>
      <div class="w-form-done">
        <div>Thank you! Your submission has been received!</div>
      </div>
      <div class="w-form-fail">
        <div>Oops! Something went wrong while submitting the form.</div>
      </div>
    </div>
  </div>
</div>

Thanks!

Why do you want to add this line? Simply revert back to the original file to get things working again.

Hi Samliew

Thank you for responding me.

I’m using the original, but show up error message from WordPress, if the just static page it works, only have the issue when I convert to WordPress theme.
Oops! This page has improperly configured forms. Please contact your website administrator to fix this issue.

Thanks!

Did you delete your Webflow project? That could explain why the form couldn’t submit to Webflow.

Hi,

Regarding error “Oops! This page has improperly configured forms. Please contact your website administrator to fix this issue”

I racked my brain trying to fix this. In the end I added a piece of code to my js file on line 29. return;a=t(“html”).attr(“data-wf-site”) before ,u=“https://webflow.com/api/v1/form/

This is the entire line; Row 29
t.exports=function(){var t={VERSION:“1.6.0-Webflow”},e={},n=Array.prototype,i=Object.prototype,o=Function.prototype,a=(n.push,n.slice),s=(n.concat,i.toString,i.hasOwnProperty),u=n.forEach,c=n.map,l=(n.reduce,n.reduceRight,n.filter),f=(n.every,n.some),d=n.indexOf,h=(n.lastIndexOf,Array.isArray,Object.keys),p=(o.bind,t.each=t.forEach=function(n,i,r){if(null==n)return n;if(u&&n.forEach===u)n.forEach(i,r);else if(n.length===+n.length){for(var o=0,a=n.length;o<a;o++)if(i.call(r,n[o],o,n)===e)return}else{var s=t.keys(n);for(o=0,a=s.length;o<a;o++)if(i.call(r,n[s[o]],s[o],n)===e)return}return n});t.map=t.collect=function(t,e,n){var i=;return null==t?i:c&&t.map===c?t.map(e,n):(p(t,function(t,r,o){i.push(e.call(n,t,r,o))}),i)},t.find=t.detect=function(t,e,n){var i;return v(t,function(t,r,o){if(e.call(n,t,r,o))return i=t,!0}),i},t.filter=t.select=function(t,e,n){var i=;return null==t?i:l&&t.filter===l?t.filter(e,n):(p(t,function(t,r,o){e.call(n,t,r,o)&&i.push(t)}),i)};var v=t.some=t.any=function(n,i,r){i||(i=t.identity);var o=!1;return null==n?o:f&&n.some===f?n.some(i,r):(p(n,function(t,n,a){if(o||(o=i.call(r,t,n,a)))return e}),!!o)};t.contains=t.include=function(t,e){return null!=t&&(d&&t.indexOf===d?-1!=t.indexOf(e):v(t,function(t){return t===e}))},t.delay=function(t,e){var n=a.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},t.defer=function(e){return t.delay.apply(t,[e,1].concat(a.call(arguments,1)))},t.throttle=function(t){var e,n,i;return function(){e||(e=!0,n=arguments,i=this,r.frame(function(){e=!1,t.apply(i,n)}))}},t.debounce=function(e,n,i){var r,o,a,s,u,c=function c(){var l=t.now()-s;l<n?r=setTimeout(c,n-l):(r=null,i||(u=e.apply(a,o),a=o=null))};return function(){a=this,o=arguments,s=t.now();var l=i&&!r;return r||(r=setTimeout(c,n)),l&&(u=e.apply(a,o),a=o=null),u}},t.defaults=function(e){if(!t.isObject(e))return e;for(var n=1,i=arguments.length;n<i;n++){var r=arguments[n];for(var o in r)void 0===e[o]&&(e[o]=r[o])}return e},t.keys=function(e){if(!t.isObject(e))return;if(h)return h(e);var n=;for(var i in e)t.has(e,i)&&n.push(i);return n},t.has=function(t,e){return s.call(t,e)},t.isObject=function(t){return t===Object(t)},t.now=Date.now||function(){return(new Date).getTime()},t.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var m=/(.)^/,g={“'”:“'”,“\”:“\”,“\r”:“r”,“\n”:“n”,“\u2028”:“u2028”,“\u2029”:“u2029”},w=/\|‘|\r|\n|\u2028|\u2029/g,y=function(t){return"\“+g[t]};return t.template=function(e,n,i){!n&&i&&(n=i),n=t.defaults({},n,t.templateSettings);var r=RegExp([(n.escape||m).source,(n.interpolate||m).source,(n.evaluate||m).source].join(”|“)+”|$“,“g”),o=0,a=”__p+=’“;e.replace(r,function(t,n,i,r,s){return a+=e.slice(o,s).replace(w,y),o=s+t.length,n?a+=”‘+\n((__t=(“+n+”))==null?’‘:.escape(__t))+\n’“:i?a+=”‘+\n((__t=(“+i+”))==null?’‘:__t)+\n’“:r&&(a+=”‘;\n"+r+"\n__p+=’“),t}),a+=”‘;\n",n.variable||(a=“with(obj||{}){\n”+a+“}\n”),a="var __t,__p=’‘,__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,’');};\n"+a+“return __p;\n”;try{var s=new Function(n.variable||“obj”,"“,a)}catch(t){throw t.source=a,t}var u=function(e){return s.call(this,e,t)},c=n.variable||“obj”;return u.source=“function(”+c+”){\n"+a+“}”,u},t}()},function(t,e,n){var i=n(0),r=n(1);i.define(“dropdown”,t.exports=function(t,e){var n,o,a={},s=t(document),u=i.env(),c=i.env.touch,l=“.w-dropdown”,f=“w–open”,d=“w-close”+l,h=r.triggers,p=900,v=!1;function m(){o=u&&i.env(“design”),(n=s.find(l)).each(g)}function g(n,r){var a=t(r),c=t.data(r,l);c||(c=t.data(r,l,{open:!1,el:a,config:{}})),c.list=a.children(“.w-dropdown-list”),c.toggle=a.children(“.w-dropdown-toggle”),c.links=c.list.children(“.w-dropdown-link”),c.outside=function(n){n.outside&&s.off(k()+l,n.outside);return e.debounce(function(e){if(n.open){var r=t(e.target);if(!r.closest(“.w-dropdown-toggle”).length){var o=-1===t.inArray(n.el[0],r.parents(l)),a=i.env(“editor”);if(o){if(a){var s=1===r.parents().length&&1===r.parents(“svg”).length,u=r.parents(“.w-editor-bem-EditorHoverControls”).length;if(s||u)return}x(n)}}}})}(c),c.complete=function(t){return function(){t.list.removeClass(f),t.toggle.removeClass(f),t.manageZ&&t.el.css(“z-index”,“”)}}(c),c.leave=function(t){return function(){t.hovering=!1,x(t)}}(c),c.moveOutside=function(n){return e.debounce(function(e){if(n.open){var i=t(e.target),r=-1===t.inArray(n.el[0],i.parents(l));if(r){var o=i.parents(“.w-editor-bem-EditorHoverControls”).length,a=i.parents(“.w-editor-bem-RTToolbar”).length,s=t(“.w-editor-bem-EditorOverlay”),u=s.find(“.w-editor-edit-outline”).length||s.find(“.w-editor-bem-RTToolbar”).length;if(o||a||u)return;n.hovering=!1,x(n)}}})}(c),a.off(l),c.toggle.off(l),w(c),c.nav&&c.nav.off(l),c.nav=a.closest(“.w-nav”),c.nav.on(d,y(c)),o?a.on(“setting”+l,y(c)):(c.toggle.on(k()+l,function(t){return e.debounce(function(){t.open?x(t):b(t)})}(c)),c.config.hover&&c.toggle.on(“mouseenter”+l,function(t){return function(){t.hovering=!0,b(t)}}(c)),a.on(d,y(c)),u&&(c.hovering=!1,x(c)))}function w(t){var e=Number(t.el.css(“z-index”));t.manageZ=e===p||e===p+1,t.config={hover:Boolean(t.el.attr(“data-hover”))&&!c,delay:Number(t.el.attr(“data-delay”))||0}}function y(t){return function(e,n){return n=n||{},“w-close”===e.type?x(t):“setting”===e.type?(w(t),!0===n.open&&b(t),void(!1===n.open&&x(t,!0))):void 0}}function b(e){if(!e.open){!function(e){var i=e.el[0];n.each(function(e,n){var r=t(n);r.is(i)||r.has(i).length||r.triggerHandler(d)})}(e),e.open=!0,e.list.addClass(f),e.toggle.addClass(f),h.intro(0,e.el[0]),i.redraw.up(),e.manageZ&&e.el.css(“z-index”,p+1);var r=i.env(“editor”);o||s.on(k()+l,e.outside),e.hovering&&!r&&e.el.on(“mouseleave”+l,e.leave),e.hovering&&r&&s.on(“mousemove”+l,e.moveOutside),window.clearTimeout(e.delayId)}}function x(t,e){if(t.open&&(!t.config.hover||!t.hovering)){t.open=!1;var n=t.config;if(h.outro(0,t.el[0]),s.off(k()+l,t.outside),t.el.off(“mouseleave”+l,t.leave),s.off(“mousemove”+l,t.moveOutside),window.clearTimeout(t.delayId),!n.delay||e)return t.complete();t.delayId=window.setTimeout(t.complete,n.delay)}}function k(){return c?“tap”:“mouseup”}return a.ready=m,a.design=function(){v&&s.find(l).each(function(e,n){t(n).triggerHandler(d)}),v=!1,m()},a.preview=function(){v=!0,m()},a})},function(t,e,n){var i=n(0);i.define(“forms”,t.exports=function(t,e){var r={};n(9);var o,a,s,u,c,l=t(document),f=window.location,d=window.XDomainRequest&&!window.atob,h=“.w-form”,p=/e(-)?mail/i,v=/^\S+@\S+$/,m=window.alert,g=i.env(),w=/list-manage[1-9]?.com/i,y=e.debounce(function(){m(“Oops! This page has improperly configured forms. Please contact your website administrator to fix this issue.”)},100);function b(e,n){var i=t(n),r=t.data(n,h);r||(r=t.data(n,h,{form:i})),x(r);var o=i.closest(“div.w-form”);r.done=o.find(“> .w-form-done”),r.fail=o.find(“> .w-form-fail”),r.fileUploads=o.find(“.w-file-upload”),r.fileUploads.each(function(e){!function(e,n){if(!n.fileUploads||!n.fileUploads[e])return;var i,r=t(n.fileUploads[e]),o=r.find(“> .w-file-upload-default”),a=r.find(“> .w-file-upload-uploading”),s=r.find(“> .w-file-upload-success”),u=r.find(“> .w-file-upload-error”),l=o.find(“.w-file-upload-input”),f=o.find(“.w-file-upload-label”),d=u.find(“.w-file-upload-error-msg”),h=s.find(“.w-file-upload-file”),p=s.find(“.w-file-remove-link”),v=h.find(“.w-file-upload-file-name”),m=d.attr(“data-w-size-error”),w=d.attr(“data-w-type-error”),y=d.attr(“data-w-generic-error”);if(g)l.on(“click”,function(t){t.preventDefault()}),f.on(“click”,function(t){t.preventDefault()});else{p.on(“click”,function(){l.removeAttr(“data-value”),l.val(“”),v.html(“”),o.toggle(!0),s.toggle(!1)}),l.on(“change”,function(r){(i=r.target&&r.target.files&&r.target.files[0])&&(o.toggle(!1),u.toggle(!1),a.toggle(!0),v.text(i.name),E()||k(n),n.fileUploads[e].uploading=!0,function(e,n){var i={name:e.name,size:e.size};t.ajax({type:“POST”,url:c,data:i,dataType:“json”,crossDomain:!0}).done(function(t){n(null,t)}).fail(function(t){n(t)})}(i,T))});var b=f.outerHeight();l.height(b),l.width(1)}function _(t){var i=t.responseJSON&&t.responseJSON.msg,r=y;“string”==typeof i&&0===i.indexOf(“InvalidFileTypeError”)?r=w:“string”==typeof i&&0===i.indexOf(“MaxFileSizeError”)&&(r=m),d.text(r),l.removeAttr(“data-value”),l.val(“”),a.toggle(!1),o.toggle(!0),u.toggle(!0),n.fileUploads[e].uploading=!1,E()||x(n)}function T(e,n){if(e)return _(e);var r=n.fileName,o=n.postData,a=n.fileId,s=n.s3Url;l.attr(“data-value”,a),function(e,n,i,r,o){var a=new FormData;for(var s in n)a.append(s,n[s]);a.append(“file”,i,r),t.ajax({type:“POST”,url:e,data:a,processData:!1,contentType:!1}).done(function(){o(null)}).fail(function(t){o(t)})}(s,o,i,r,O)}function O(t){if(t)return _(t);a.toggle(!1),s.css(“display”,“inline-block”),n.fileUploads[e].uploading=!1,E()||x(n)}function E(){var t=n.fileUploads&&n.fileUploads.toArray()||;return t.some(function(t){return t.uploading})}}(e,r)});var s=r.action=i.attr(“action”);r.handler=null,r.redirect=i.attr(“data-redirect”),w.test(s)?r.handler=O:s||(a?r.handler=“function”==typeof hostedSubmitWebflow?hostedSubmitWebflow:T:y())}function x(t){var e=t.btn=t.form.find(’:input[type=“submit”]');t.wait=t.btn.attr(“data-wait”)||null,t.success=!1,e.prop(“disabled”,!1),t.label&&e.val(t.label)}function k(t){var e=t.btn,n=t.wait;e.prop(“disabled”,!0),n&&(t.label=e.val(),e.val(n))}function (e,n){var i=null;return n=n||{},e.find(‘:input:not([type=“submit”]):not([type=“file”])’).each(function(r,o){var a=t(o),s=a.attr(“type”),u=a.attr(“data-name”)||a.attr(“name”)||“Field “+(r+1),c=a.val();if(“checkbox”===s)c=a.is(”:checked”);else if(“radio”===s){if(null===n[u]||“string”==typeof n[u])return;c=e.find(‘input[name="’+a.attr(“name”)+‘"]:checked’).val()||null}“string”==typeof c&&(c=t.trim(c)),n[u]=c,i=i||function(t,e,n,i){var r=null;“password”===e?r=“Passwords cannot be submitted.”:t.attr(“required”)?i?p.test(t.attr(“type”))&&(v.test(i)||(r="Please enter a valid email address for: "+n)):r="Please fill out the required field: "+n:“g-recaptcha-response”!==n||i||(r=“Please confirm you’re not a robot.”);return r}(a,s,u,c)}),i}function T(t){z(t),E(t)}function O(n){x(n);var i=n.form,r={};if(!/^https/.test(f.href)||/^https/.test(n.action)){z(n);var o,a=(i,r);if(a)return m(a);k(n),e.each(r,function(t,e){p.test(e)&&(r.EMAIL=t),/^((full[ _-]?)?name)$/i.test(e)&&(o=t),/^(first[ -]?name)$/i.test(e)&&(r.FNAME=t),/^(last[ -]?name)$/i.test(e)&&(r.LNAME=t)}),o&&!r.FNAME&&(o=o.split(" “),r.FNAME=o[0],r.LNAME=r.LNAME||o[1]);var s=n.action.replace(”/post?“,”/post-json?“)+”&c=?“,u=s.indexOf(“u=”)+2;u=s.substring(u,s.indexOf(”&“,u));var c=s.indexOf(“id=”)+3;c=s.substring(c,s.indexOf(”&",c)),r["b"+u+"“+c]=”",t.ajax({url:s,data:r,dataType:“jsonp”}).done(function(t){n.success=“success”===t.result||/already/.test(t.msg),n.success||console.info(“MailChimp error: “+t.msg),E(n)}).fail(function(){E(n)})}else i.attr(“method”,“post”)}function E(t){var e=t.form,n=t.redirect,r=t.success;r&&n?i.location(n):(t.done.toggle(r),t.fail.toggle(!r),e.toggle(!r),x(t))}function z(t){t.evt&&t.evt.preventDefault(),t.evt=null}return r.ready=r.design=r.preview=function(){!function(){return;a=t(“html”).attr(“data-wf-site”),u=“https://webflow.com/api/v1/form/“+a,d&&u.indexOf(“https://webflow.com”)>=0&&(u=u.replace(“https://webflow.com”,“http://formdata.webflow.com”));if(c=u+”/signFile",!(o=t(h+" form”)).length)return;o.each(b)}(),g||s||(s=!0,l.on(“submit”,h+” form”,function(e){var n=t.data(this,h);n.handler&&(n.evt=e,n.handler(n))}))},r})},function(t,e){