Forums

Redirect is displayed in the module location.

primalduty 20 Oct, 2014
Hi, I'm using a Chronoform5 form inside a module on a page. I would like to redirect the form to a thank you page upon submitting the form. I have created an article and a hidden menu link for the thank you page and can access it from the web browser using the SEF URL.

I added the redirect URL into the form setup page in the On submit section and it sends the confirmation email but the redirect opens in the small module we're using for the form.

Can anyone provide some guidance to what I may be doing incorrect?

Thank you,
PD
primalduty 21 Oct, 2014
Hi Bob,

Thank you for your suggestion. It made sense to me and sounded logical so I tried it. I tried using the Joomla! redirect code in a Custom Code action instead

So, I created a custom code action item in the On submit section with the following code:

<?php
$app =& JFactory::getApplication();
$app->redirect('http://www.drkevinsadati.com/thank-you-page.html');
?>

But the same outcome occurred, that is the thank you page is placed into the same module the Chronoform is located and not redirecting to a whole new page.

See attached images.

Do you have any other ideas?

Contact page before form submission: [attachment=0]contact-before.jpg[/attachment]

Contact page after form submission:[attachment=1]contact-after.jpg[/attachment]
GreyHead 21 Oct, 2014
Hi PD,

How are you placing the ChronoForm in a module? It sounds as though you are doing it using an iFrame - otherwise the PHP redirect should redirect the whole page?

Bob
primalduty 21 Oct, 2014
Hi Bob,

Thank you for helping me with this. It's a ChronoForm module so I call it by it's form name within the module. I use the chronoform name in the chronoform module to call the form.

Does the chronoform module use <iframe>?

Mike

[attachment=0]chronoform-module.jpg[/attachment]
Max_admin 22 Oct, 2014
The Chronoforms module does NOT use an iFrame, it may be your template ?

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
primalduty 22 Oct, 2014
Hi Max, I was answering GreyHead's question regarding how I was displaying the form/module, and I told him with a chronoform module. Do you think the issue has anything to do with the way I set it up? For example, using a module to display a Chronoform. The custom code or redirect both render the thank you page in the module position.

How can the template be causing this?

Joomla. 3.2.7

Mike
GreyHead 23 Oct, 2014
1 Likes
Hi Mike,

The content in your redirect page is
We appreciate you taking the time to fill out the Contact form.
We will try to reply to you as soon as we can.

Have a Great Day
while the message showing after the form submits is different
We appreciate you taking the time to fill out the Contact form.
We will try to reply to you as soon as we can.
The Have great day is missing.

I suspect that what is being displayed is in a Display Message action, not from the Redirect page. What actions do you have in the On Submit event?

Bob
primalduty 23 Oct, 2014
Hi Bob,

Because the site is currently live I have a Honeypot, Email, and display message actions onSubmit. See picture below:

[attachment=0]form-actions-onSubmit.jpg[/attachment]

I have replaced the "display message" action with both the Custom Code action as you suggested & the Redirect Action separately in an attempt to redirect the visitor to a new page onSubmit, but the redirect page is displayed in the module location.

Mike

PS, you are correct, the "thank-you-page" and "message" have different verbiage.
GreyHead 23 Oct, 2014
Hi Mike,

I'm now completely confused. Where is the redirect code? I'm afraid that I don't believe that the redirect will display in the module location - if it does then it isn’t redirecting :-(

By all means email or PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.

Bob
GreyHead 23 Oct, 2014
Answer
1 Likes
Hi Mike,

To get the form to ReDirect you need to turn Ajax off in the Show HTML action. With that on the page isn't reloaded and so the ReDirect doesn't get to work.

Bob

PS You should also drag an Event Loop action into the On Fail event of the HoneyPot check to get that to work - again, I'm not sure the HoneyPot will work with Ajax submit on - Max may know.
primalduty 23 Oct, 2014
Hi Bob, Thank you very much for helping me though this issue. It makes sense now that you share the fact that the Ajax was turned on to support the onscreen message. Once I turned it off it worked as designed.

I'm not very familiar with the Honeypot. In fact, this is the first time I used it. I'm afraid to turn the on fail event on. But, I did anyway and it seems to work as designed. Thanks again for the fix and advice.

Mike
This topic is locked and no more replies can be posted.