Forums

Redirect to new page upon submit

arfadmin 23 Dec, 2023
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
Max_admin 25 Dec, 2023
Answer
use a redirect action in the "submit" part of the form and set the URL(address) you want to redirect to
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
arfadmin 26 Dec, 2023
Yes, that's what I did but how do I force it to open the external URL in a different tab/page?
Max_admin 02 Jan, 2024
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:

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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
arfadmin 23 Mar, 2025

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

Max_admin 31 Mar, 2025

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

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.