The Thank you message!

Ron 23 Oct, 2011
Hello,
I would like to know if there are some setting in the CFV4 that has a possibility for how long can the thank you message be displayed after a visitor fills the form.

I would like to display the Thank you message only for a short time then redirected to a different URL.

Can I do this in CF.

Thanks

Ron
GreyHead 24 Oct, 2011
Hi Ron,

There is no setting in ChronoForms but you can do it by adding a meta tag to the page. The code is here in the forums for ChronoForms v3 and should work with ChronoForms v4.

Bob
Ron 24 Oct, 2011
Thanks Bob,

This code does not work for me: I put it on submit after email in CF V4
<?php
$mainframe =& JFactory::getApplication();

$custom_tag = '<meta http-equiv="refresh" content="10;url=http://www.xyz.com" >';
$mainframe->addCustomHeadTag($custom_tag);
?>
<p>Hello <?php echo $_POST['hello'] ?> <?php echo $_POST['fullname'] ?></p>
<p>We thank yu</p>


Where could I be going wrong ?

Thanks for all the help

Ron
GreyHead 25 Oct, 2011
Hi Ron,

This works in a Custom Code action in CFV4 on Joomla! 1.7.2
<?php
$doc = JFactory::getDocument();
$doc->setMetaData("refresh", "10;url=http://www.xyz.com", true, true);
?>
<p>Hello <?php echo $form->data['hello'].' '.$form->data['fullname']; ?></p>
<p>We thank you</p>

Bob
Ron 26 Oct, 2011
Bob,

This code works partially,

The message is displayed but the page in not refreshed to a different url in 10 seconds.

Thanks
Ron
GreyHead 26 Oct, 2011
Hi Ron,

It still works OK here.

Bob
Ron 26 Oct, 2011
Thanks for the Reply Bob,

It works with Firefox but I cannot go to the proper URL of chronoform as it adds "charset=utf-8" to the address.

It does not work in safari and Crome. It works in IE but just refreshes every 10 seconds and does not get directed to the URL specified..

Thanks

Ron
GreyHead 27 Oct, 2011
Hi Ron,

Looks like a joomla bug to me :-(

Try asking in the Joomla! forums and let us know what you discover.

Bob
Ron 27 Oct, 2011
Okay and thanks

Ron
GreyHead 29 Dec, 2011
Hi Ron,

I just posted this reply in the Joomla! forums:

It looks to me as though this is a Joomla! bug. In Joomla! 1.7.3 libraries/joomla/document/html/renderer/head.php at line 75 is this code

if ($type == 'http-equiv') {
  $content.= '; charset=' . $document->getCharset();
  $buffer .= $tab.'<meta http-equiv="'.$name.'" content="'.htmlspecialchars($content).'"'.$tagEnd.$lnEnd;
}
which adds the 'charset' suffix to all http-equiv MetaTags when it should probably only be appended to content-type tags.
if ($type == 'http-equiv') {
  if ( $name == 'content-type' )  {
    $content.= '; charset=' . $document->getCharset();
  }
  $buffer .= $tab.'<meta http-equiv="'.$name.'" content="'.htmlspecialchars($content).'"'.$tagEnd.$lnEnd;
}


Bob
Ron 29 Dec, 2011
WOW Bob,

I am so thankful to you for the reply.😀 , I am going to implement it and let you know.

Thanks again

Ron
Ron 29 Dec, 2011
Hey BOB 😀 😀 .

I am so thankful to you. It is working now. Just perfect.

Thanks a lot for everything. Have a great New Year and God bless you.

You Rock.

Ron
sebBleuKiwi 23 Sep, 2012
Hi Bob,

I don't find where is the bug. I use Joomla 2.5 and Chronoforms V4. My form is a registrate form. On Submit, i call Joomla User Registration which On Success, i drag and drop a Custom Code (where is my durating redict url), then a Show Thanks Message and an email. I change too the parameters in the head.php line 75 but nothing to do... Could you help me?

And sorry for my english, i'm french...
GreyHead 23 Sep, 2012
Bonjour sebBleuKiwi,

What is in your Custom Code? It sounds as though you may be redirecting the user before the Thank You Message is shown.

Bob
sebBleuKiwi 23 Sep, 2012
In my custom Code, there is :
<?php
        $doc =& JFactory::getDocument();
        $doc->setMetaData('refresh', '10;'.$form->data['redirect_url'].'', 'true');
?>


Then, there is my Show Thanks Message,

Then, there is my redirect User.

Now, the redirection work it, but we don't have the Thanks Message.

Do you know?

Thank you very much for all.
GreyHead 24 Sep, 2012
Hi sebBleuKiwi,

I'm not sure exactly what is happening here. A couple of things to try though:

a) Move the Show Thanks Message action before the Custom Code action.

If that doesn't work then

b) Add the Thanks Message HTML directly to the Custom Code action - I think that it will be displayed OK from there.

Bob
GreyHead 13 Nov, 2012
Hi sebBleuKiwi,

I've done some more research on this and added this FAQ.

Bob
maimar 25 Nov, 2012
It works in Chrome
BigStef 21 Jan, 2013
Hey Greyhead,
just to inform you here, i have tried with your FAQ but could'nt have my redirection. After have read the topic on Joomla Forum, i found Skitalec giving this code :
<?php
$doc = &JFactory::getDocument();
$doc->addCustomTag('<meta http-equiv="refresh" content="10;url=http://forum.joomla.org" />');
?>

Wich finally worked for me on Joomla 2.5.8 with CCv4 RC3.5.1
This topic is locked and no more replies can be posted.