-
odm111Asked on April 9, 2016 at 5:33 PM
Hi there
In my order form for regular clients, I've put a button with a link to a different form for new clients.
However, when the button is clicked it opens the new form but it appears to open it within the existing website page, rather than redirecting the user to the new page. It still displays the form but with another copy of the website header above the form (see screenshot). This is in Google Chrome.
In Mozilla Firefox the link doesn't work at all.
Thanks in advance.
-
Chriistian Jotform SupportReplied on April 9, 2016 at 11:31 PM
Hi,
You need to add target attribute with _blank value to the HTML of the link you created. Please see steps below.
With that, clicking the button should redirect users to new tab in the browser.
You may check and clone my cloned form - https://form.jotform.com/60998962065976
-
odm111Replied on April 10, 2016 at 7:52 PM
Thanks for your help.
Google Chrome - partially solved
Yes, adding target="_blank" opens the form in a new tab in Google Chrome which is great, but it still keeps the original tab open which is not ideal. Any ideas how to close the original form?
Mozilla Firefox - error persists
Clicking the link still doesn't open the new form in Mozilla Firefox. Here is a screenshot of what happens when I click it, using your cloned form. It seems the form is treating it like a submit button.
Thanks.
-
Chriistian Jotform SupportReplied on April 10, 2016 at 9:34 PM
Closing the original tab would require adding javascript to your form, however, adding javascript is not allowed in jotform. The only way you can add javascript to your form is to use the full source code of the form.
If you use the full source code of the form, then you can use the link below to open a new tab while closing the original tab.
<a href="http://www.downrightbrilliant.co.nz/dbn-new-client" target="_blank" onDISABLEDclick="javascriptDISABLED: setTimeout(window.close, 10);">First time client? Click here.</a>
Please note that when you use the full source code of the form, you will need to update it in your website every time you make changes to the form.
As for the issue with firefox, please allow me some time to investigate this issue further and I will update you once I have a possible workaround.
Regards.
-
odm111Replied on April 10, 2016 at 11:29 PM
Okay, I've decided to put the button directly on the webpage, above the form, as a work around I'm satisfied with. Javascript is a little too much to get my head around. Thank you for your help.
-
Chriistian Jotform SupportReplied on April 11, 2016 at 1:23 AM
You are most welcome. Putting the button directly on the webpage should resolve the issue with the required fields appearing in Firefox. If you have any other concerns, feel free to contact us again. Cheers.