Display Template collectedinfo/content/nodeid

Author Message

Lars Eirik R

Thursday 17 December 2009 2:53:05 am

Hi.

Is there a way to have the result page after a form has been submitted not redisplay it self?

I find it somewhat odd that i can retrigger the page /collectedinfo/1301 from other computers and actually have it display the same text as i get when infront of the computer where i submitted the variables.

Do i have to use a redirect function or similar if a variable has not been posted sucessfully? Is this not soemthing the framework actually should handled itself ?

Thanks for a great product guys!

Peter Keung

Thursday 17 December 2009 8:51:33 am

This article by Paul Wilson is a good intro to what eZ Publish forms can do:

http://share.ez.no/articles/ez-publish/how-to-create-ez-publish-forms/

Page 3 is particularly useful, as it explains the settings in collect.ini (see the [DisplaySettings] block):

http://share.ez.no/articles/ez-publish/how-to-create-ez-publish-forms/(page)/3

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

Lars Eirik R

Friday 18 December 2009 8:19:59 am

Thanks Peter.

I have already managed to creat my form and it is working as intented.

My questions was mere , how can i make sure no other user can access the confirmation page after the submission?

Should i use the http object and check that a given variable was set or is there another way to do this?

In my case, this page actually outputs a javascript which sends info to a 3rd party which monitors the number of times someone actually has submitted the form.

If another user freely may visit this page , than these statistics will not be correct.

Any other ideas guys?

Nicolas Pastorino

Tuesday 26 January 2010 2:51:01 am

Hei!,

Not knowing whether you actually managed to solve the issue, here are a few hints that might help.

First, in collect.ini, the following configuration directives allow for controlling the information collection's system behaviour right after data was collected :

[DisplaySettings]
# result   - Display IC result, for instance poll result or your form data
# redirect - Redirect to a specific url
# node     - Redirect back to content node
Display=result
# Matches class id or identifier to information collection type
DisplayList[]
#DisplayList[poll]=result
DisplayAttribute=collection_display
# The url to redirect to if DisplayHandling is set to redirect
RedirectURL=/
# Matches class id or identifier to information collection type
RedirectURLList[]
RedirectURLAttribute=collection_redirect

However, i am not sure this blocks the '/collectedinfo/1301' page from being viewed. The latter may contain sensitive data, and/or should not be hit without having submitted the data collection form, this potentially damaging the collected data's relevancy (this seems to be your case, am i wrong ?). One solution (not the cleanest one but can't think of another right now) could be to push some logic in the result template ( content/collectedinfo/form.tpl or the one you defined in collect.ini [InfoSettings] . TypeList ), like testing whether the page was reached after a form submission, or if the current user already has voted for this collection, etc..

Hope it helps,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

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 18 2025 05:12:29
Script start
Timing: Jan 18 2025 05:12:29
Module start 'layout'
Timing: Jan 18 2025 05:12:29
Module start 'content'
Timing: Jan 18 2025 05:12:30
Module end 'content'
Timing: Jan 18 2025 05:12:30
Script end

Main resources:

Total runtime0.7787 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 589.4766152.6406
Module start 'layout' 0.00760.0033 742.117239.4766
Module start 'content' 0.01090.7660 781.5938604.5469
Module end 'content' 0.77690.0017 1,386.140616.1250
Script end 0.7787  1,402.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.5166160.0003
Check MTime0.00140.1781160.0001
Mysql Total
Database connection0.00110.146910.0011
Mysqli_queries0.711291.3239620.0115
Looping result0.00070.0911600.0000
Template Total0.739895.020.3699
Template load0.00220.276220.0011
Template processing0.737694.723820.3688
Template load and register function0.00010.015310.0001
states
state_id_array0.00130.161010.0013
state_identifier_array0.00200.253620.0010
Override
Cache load0.00180.2283330.0001
Sytem overhead
Fetch class attribute can translate value0.00080.107530.0003
Fetch class attribute name0.00140.178570.0002
XML
Image XML parsing0.00180.235030.0006
class_abstraction
Instantiating content class attribute0.00000.002280.0000
General
dbfile0.00260.3330290.0001
String conversion0.00000.001240.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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs