-1

I have embedded a form on my wix website - it looks like this:

<script type="text/javascript" src="https://premier.formstack.com/forms/js.php/formname"></script>

But the thank you page URL keeps loading inside the form frame. How can I force it to load on the parent page upon submission?

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
Eirini Gia
  • 11
  • 2
  • Welcome to Stack Overflow! Please, read the [ask] page and update your question. – Jeroen Heier Jun 09 '18 at 10:34
  • I am confused. I don't see any ` – MiB Jun 09 '18 at 10:37
  • This is the script for the form - the thank you page is specified in the form settings in formstack. – Eirini Gia Jun 09 '18 at 11:06
  • Dont know where this weird code came from - apologies its the first time I am using stack overflow and clearly Ive done something wrong! :) – Eirini Gia Jun 09 '18 at 11:09

1 Answers1

0

As fas as I see, you have embedded JavaScript, when I checked, it basically adds form to the document.

document.write("<!DOCTYPE html>"+"\n");
document.write("<html  lang=\"\">"+"\n");
document.write("<head>"+"\n");
document.write("    <meta charset=\"utf-8\" />"+"\n");
document.write("    <title>Formstack</title>"+"\n");
document.write("    <link rel=\"stylesheet\" type=\"text/css\" href=\"/forms/style.css\" />"+"\n");
document.write("</head>"+"\n");
document.write("<body>"+"\n");
document.write("    <div id=\"error\" class=\"formError\"><strong>ERROR:</strong> It looks like we couldn\'t find a form with that URL. Please double-check the URL and try again. If you\'re still having trouble, try contacting the person who sent you this form. (Error ID: b15b76df14cf6527b8ee)"+"\n");
document.write("        "+"\n");
document.write("                <br /><br />"+"\n");
document.write("        <form class=\"formErrorBack\" action=\"\">"+"\n");
document.write("            <input type=\"button\" value=\"Back\" onclick=\"history.back()\" />"+"\n");
document.write("        </form>"+"\n");
document.write("                "+"\n");
document.write("    </div>"+"\n");
document.write("</body>"+"\n");
document.write("</html>"+"\n");
document.write(""+"\n");

But you need to specify the formname

Example when I replaced it by 30_day_employee_review you can the see the form loaded.

<script type="text/javascript" 
src="https://premier.formstack.com/forms/js.php/30_day_employee_review"></script>

Cheers and welcome to StackOverflow!

Sunil B N
  • 4,159
  • 1
  • 31
  • 52
  • Thanks Sunil B N. I used formname as an example - not in my actual code. The form itself works -and displays properly. Its the thank you page that loads in the iframe and breaks everything. – Eirini Gia Jun 10 '18 at 09:41
  • "breaks" means? does it disturb your UI? page hangs? Can you share more code to understand what exactly is happening. – Sunil B N Jun 11 '18 at 04:01
  • 1
    By breaks I mean that it loads a new page in the iframe of the form. The problem is that wix adds the iframe which I cannot edit but I think I found a way around it. Many thanks for your help! – Eirini Gia Jun 12 '18 at 08:05