2 Form collection

Author Message

Albert Balagueró

Wednesday 25 August 2010 4:08:03 am

Hello,
anybody knows if it's possible to have two forms in the same page?
If it's possible, how I may configure the feedback options for both?

Thank you.

Robin Muilwijk

Thursday 26 August 2010 11:27:57 am

Hi,

What is the purpose/goal of having 2 forms on one single page? Forms usually forward you to another page, so submitting one of the two will take you away from the second form? Or is there something specific that there needs to be 2 forms?

Thanks and regards, Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Patrick Kaiser

Thursday 26 August 2010 1:49:59 pm

There are usecases where this can make sense, a newsletter subscription AND unsusbcription form on one page for example.

If want your forms to use custom templates, create and place them somewhere under templates/node/view/*, for example as myform1_embed.tpl.

In the template that renders the multiform page fetch the two form objects. Then use something like this to display the forms.

{def 
     $myFormNode1=fetch( 'content', 'node', hash( 'node_id', 96 ) )
     $myFormNode2=fetch( 'content', 'node', hash( 'node_id', 97 ) )
}

<h2>My first form</h2> 
{node_view_gui content_node=$myFormNode1 view='myform1_embed'}

<h2>My second form</h2>
{node_view_gui content_node=$myFormNode2 view='myform2_embed'

Let me know if this helped.


Best regards,

Patrick

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 03:10:49
Script start
Timing: Jan 18 2025 03:10:49
Module start 'layout'
Timing: Jan 18 2025 03:10:49
Module start 'content'
Timing: Jan 18 2025 03:10:50
Module end 'content'
Timing: Jan 18 2025 03:10:50
Script end

Main resources:

Total runtime1.1863 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0042 588.9297152.6094
Module start 'layout' 0.00420.0033 741.539139.4297
Module start 'content' 0.00751.1773 780.9688579.6094
Module end 'content' 1.18480.0014 1,360.578112.1875
Script end 1.1862  1,372.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2521160.0002
Check MTime0.00120.1028160.0001
Mysql Total
Database connection0.00050.042210.0005
Mysqli_queries1.140096.1018590.0193
Looping result0.00050.0420570.0000
Template Total1.157597.620.5788
Template load0.00180.154820.0009
Template processing1.155797.421720.5778
Template load and register function0.00010.009410.0001
states
state_id_array0.00070.058910.0007
state_identifier_array0.00120.102320.0006
Override
Cache load0.00150.1250190.0001
Sytem overhead
Fetch class attribute can translate value0.00040.035630.0001
Fetch class attribute name0.00110.088650.0002
XML
Image XML parsing0.00120.100030.0004
class_abstraction
Instantiating content class attribute0.00000.000750.0000
General
dbfile0.00090.0791240.0000
String conversion0.00000.000940.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/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: 13
 Number of unique templates used: 7

Time used to render debug report: 0.0003 secs