Trying to use RedirectBack in tipafriend form...

Author Message

Xavier Serna

Monday 18 December 2006 8:02:28 am

Hi!

I'm interested in using the RedirectBack function in a tipafriend form, so when a user fills the form and send it, he will come back automatically to the same page where there was, instead of loading a Thank You page and a link to come back.
The problem is that I can't find any way to know that the form was sent correctly, and thus inform the user of that. I only get a page reload, and the the user can think that the process was not done, and is a bit confusing.

Any idea would be appreciated. Thanks!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

Luis Micunco

Wednesday 14 May 2008 4:19:11 am

Im not sure if this is the correct way of doing this but worked for me:

I added this to my tipafriend form

<input type="hidden" name="RedirectBack" value="1" />

This works because in:

/kernel/content/tipafriend.php

..it is waiting for:

if ( $http->hasPostVariable( 'RedirectBack' ) && $http->postVariable( 'RedirectBack' ) == 1 )
        {
            $Module->redirectTo( '/content/view/full/' . $NodeID );
            return;
        }

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 04:32:54
Script start
Timing: Jan 31 2025 04:32:54
Module start 'layout'
Timing: Jan 31 2025 04:32:54
Module start 'content'
Timing: Jan 31 2025 04:32:55
Module end 'content'
Timing: Jan 31 2025 04:32:55
Script end

Main resources:

Total runtime1.3129 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 588.2734151.2266
Module start 'layout' 0.00770.0043 739.500036.6797
Module start 'content' 0.01211.2994 776.1797920.8047
Module end 'content' 1.31150.0014 1,696.98447.8125
Script end 1.3128  1,704.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.3054160.0003
Check MTime0.00170.1290160.0001
Mysql Total
Database connection0.00140.106610.0014
Mysqli_queries1.248095.0597540.0231
Looping result0.00070.0538520.0000
Template Total1.258695.920.6293
Template load0.00280.215720.0014
Template processing1.255895.652520.6279
Template load and register function0.00160.124510.0016
states
state_id_array0.00230.173810.0023
state_identifier_array0.00300.227420.0015
Override
Cache load0.00210.1566160.0001
Sytem overhead
Fetch class attribute can translate value0.00070.053720.0004
Fetch class attribute name0.00240.185930.0008
XML
Image XML parsing0.00380.291020.0019
class_abstraction
Instantiating content class attribute0.00000.000530.0000
General
dbfile0.00390.3001160.0002
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0003 secs