Create form & send user input by html email

Author Message

Marin Orlic

Wednesday 25 May 2005 4:50:43 pm

Hi all,

I need to create a feedback form (rather detailed) and send user input by email (html format).

My first idea was to user form/process module, but then I found out it doesn't use any template for formatting, but just dumps POST variable data and sends that to email..

So it seems I must use information collectors.. is there any dummer way, I've got something like 40+ inputs on a form - creating a class for all that is a total pain in the ... and anyway there's no need to store the data in CMS, just send it as-is.. Of course, I could probably bypass eZ altogether and use plain PHP, but it's ugly..

Any ideas, please? :)

Thanks,
Marin.

Ɓukasz Serwatka

Wednesday 25 May 2005 11:12:36 pm

You can create your own module. More info in documentation.
http://ez.no/ez_publish/documentation/development/extensions/module/module_tutorial_part_1

You will have to use ezmail class.
lib\ezutils\classes\ezmail.php

Using information collectors as you mention is also good way. If you create all inputs then you can edit/format only one tpl to set your own design from html mail (override content/collectedinfomail/form.tpl)

Remember to set ContentType=text/html in [MailSettings] in site.ini.append.php

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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 19 2025 00:08:41
Script start
Timing: Jan 19 2025 00:08:41
Module start 'layout'
Timing: Jan 19 2025 00:08:41
Module start 'content'
Timing: Jan 19 2025 00:08:43
Module end 'content'
Timing: Jan 19 2025 00:08:43
Script end

Main resources:

Total runtime1.4171 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.0057 588.0469152.6406
Module start 'layout' 0.00570.0039 740.687539.4766
Module start 'content' 0.00961.4061 780.1641527.8594
Module end 'content' 1.41570.0013 1,308.02348.1250
Script end 1.4171  1,316.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2323160.0002
Check MTime0.00130.0892160.0001
Mysql Total
Database connection0.00060.041210.0006
Mysqli_queries1.372296.8311540.0254
Looping result0.00050.0384520.0000
Template Total1.379197.320.6896
Template load0.00200.140820.0010
Template processing1.377197.179120.6886
Template load and register function0.00020.017310.0002
states
state_id_array0.00160.109410.0016
state_identifier_array0.00160.110420.0008
Override
Cache load0.00160.1164180.0001
Sytem overhead
Fetch class attribute can translate value0.00100.067520.0005
Fetch class attribute name0.00100.068030.0003
XML
Image XML parsing0.00100.068720.0005
class_abstraction
Instantiating content class attribute0.00000.000630.0000
General
dbfile0.00080.0578180.0000
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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs