Hello,
I try to add a webflow native form dynamicly on a page using jQuery. It works until you try to sbmit the form… the form don’t go anywhere. I think the is some king of restriction inside Webflow.
Do someone know how to bypass this ?
the read only link
the jQuery code
let once=0;
let newform='<div class="form-block w-form"><form id="wf-form-dynamic-form" name="wf-form-dynamic-form" data-name="dynamic form" method="get" class="form" aria-label="dynamic form"><label for="name">Name</label><input type="text" class="w-input" maxlength="256" name="name" data-name="Name" placeholder="" id="name"><label for="email">Email Address</label><input type="email" class="w-input" maxlength="256" name="email" data-name="Email" placeholder="" id="email" required=""><input type="submit" value="Submit" data-wait="Please wait..." class="w-button"></form><div class="w-form-done" tabindex="-1" role="region" aria-label="dynamic form success"><div>Thank you! Your submission has been received!</div></div><div class="w-form-fail" tabindex="-1" role="region" aria-label="dynamic form failure"><div>Oops! Something went wrong while submitting the form.</div></div></div>';
$(document).on ("click touchstart", "#boutou", function (){
if (once==0){
$( ".mycont" ).append( newform );once=1;}
});