Custom forms and form handling?

Author Message

Luis Cruz

Monday 22 November 2004 1:19:47 pm

Greetings all; I have some questions regarding creating custom forms and form processing. Here is what I need:

1. Form is displayed that contains information about one or more objects in ezPublish. For example, I may have a sign-up page that includes a drop-down list of all "events" or it might just contain the information for the event as one or more hidden fields.

2. When the form is submitted, any number of actions can occur, e.g., email might be sent to an admin as well as the user, information might have to be sent to an external database or system, etc.

2a. If there is some sort of input error, the form processing code should redirect back to the original form page. The form should display the error message(s).

3. After the form has been processed successfully, it should redirect back to a custom "submitted" page. For example, after signing up for an event, the page the user sees after form submission should say "Thank you, <user>, for registering for event <foo>" where <user> and <foo> are values passed into the page.

I have been reading through the documentation as well as the "Learning eZ publish 3" book. It appears the path I should take is to build a module extension, but I would like to hear if someone else has already implemented this and has any advice, code, etc.

Regards.

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 20 2025 08:55:32
Script start
Timing: Jan 20 2025 08:55:32
Module start 'layout'
Timing: Jan 20 2025 08:55:32
Module start 'content'
Timing: Jan 20 2025 08:55:33
Module end 'content'
Timing: Jan 20 2025 08:55:33
Script end

Main resources:

Total runtime0.9575 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.1563152.6250
Module start 'layout' 0.00560.0045 741.781339.4609
Module start 'content' 0.01010.9459 781.2422404.2891
Module end 'content' 0.95600.0015 1,185.53138.1641
Script end 0.9575  1,193.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3543160.0002
Check MTime0.00150.1522160.0001
Mysql Total
Database connection0.00070.070810.0007
Mysqli_queries0.908794.9001460.0198
Looping result0.00050.0488440.0000
Template Total0.922096.320.4610
Template load0.00210.217120.0010
Template processing0.919996.073320.4600
Template load and register function0.00870.904710.0087
states
state_id_array0.00090.097210.0009
state_identifier_array0.00230.237620.0011
Override
Cache load0.00170.1731100.0002
Sytem overhead
Fetch class attribute can translate value0.00060.066710.0006
Fetch class attribute name0.00080.084710.0008
XML
Image XML parsing0.00010.010610.0001
class_abstraction
Instantiating content class attribute0.00000.000510.0000
General
dbfile0.00110.1164100.0001
String conversion0.00000.000840.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 4
 Number of unique templates used: 4

Time used to render debug report: 0.0001 secs