Hi
How do I Redirect a ChronoForms v8 form to a new page instead of the same page after the Submit action?
I have a form displayed in a jcepopup window, when submitted, it shows url refused to connect. (assume site doesn't allow to display in the popup)
I would like the form to Redirect to display in a new page and close the popup after submission.
Thanks in advance.
best regards
Jerome
How do I Redirect a ChronoForms v8 form to a new page instead of the same page after the Submit action?
I have a form displayed in a jcepopup window, when submitted, it shows url refused to connect. (assume site doesn't allow to display in the popup)
I would like the form to Redirect to display in a new page and close the popup after submission.
Thanks in advance.
best regards
Jerome
use a redirect action in the "submit" part of the form and set the URL(address) you want to redirect to
Yes, that's what I did but how do I force it to open the external URL in a different tab/page?
The redirect will just update the current page, if you want to open a new page then you need some javascript code to do that, here is a code example:
place this code inside a javascript view in your form "submit" event
function openNewWindow() {
// URL you want to open in the new window
var url = 'https://example.com';
// Open a new window with the specified URL
window.open(url, '_blank');
}
// Event listener for the 'DOMContentLoaded' event
document.addEventListener('DOMContentLoaded', openNewWindow);
place this code inside a javascript view in your form "submit" event
Hi
I been informed by users that the above Javascript code doesn't work any more in ChronoForms.
Not sure when it stopped working, has there be any changes to ChronoForms?
I updated ChronoForms to v8.0.43 but it still doesn't work.
Thanks. Looking forward to your reply.
Jerome
if it worked before but now it does not then there may be some javascript error on the page, or somebody has changed the form setup
You need to login to be able to post a reply.