How-to: modify feedback_form as ez.no's contact form?

Author Message

Quynh Nguyen

Tuesday 24 February 2009 10:49:45 am

I did a search in forum and try to understand what contact form in ez.no really do... but too hard for a newbie like me.

I think the mainly different is the drop list in head. To do the same I should do:

- modify the feedback_form class: add one more attribute type Option.
- modify the template to show the new attribute.

I don't know how to add more option values in the new attribute and the corelative email for each option value.

I don't know how to change the corelative email with the selected option in the list. Is there any change in php code to send email to desired email? Or is there any new datatype must be install (option type) to have the similar contact page in ez.no?

Thank so much!

Greg McAvoy-Jensen

Tuesday 24 February 2009 10:55:29 am

Quynh,

May I suggest Paul Wilson's excellent article on the subject?

http://ez.no/developer/articles/how_to_create_ez_publish_forms

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Quynh Nguyen

Wednesday 25 February 2009 6:22:13 pm

Thanks for your comment!

I read this article and I think that it is not easy to modify the feedback_form, although most of us think that it is easy.

- modify class is easy... and maybe install more datatype to create the select control.
- add more recipient emails for each value in the select control, maybe in *.ini or in the class definition.
- override template to show more control after modify the feedback_form class.
- extends class php to check the selected value from select control and set approximately recipient email to receive collected information. But I don't know how to tell eZ Publish will use new class to process the $_POST data.

Am I right? Who had done it? Please show more detail for newbies and me to follow!

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 03:42:27
Script start
Timing: Jan 19 2025 03:42:27
Module start 'layout'
Timing: Jan 19 2025 03:42:27
Module start 'content'
Timing: Jan 19 2025 03:42:27
Module end 'content'
Timing: Jan 19 2025 03:42:27
Script end

Main resources:

Total runtime0.0197 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 589.3984152.6563
Module start 'layout' 0.00820.0043 742.054739.4922
Module start 'content' 0.01250.0051 781.546989.3516
Module end 'content' 0.01760.0021 870.898434.3047
Script end 0.0197  905.2031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002914.5838140.0002
Check MTime0.00136.3354140.0001
Mysql Total
Database connection0.00126.255710.0012
Mysqli_queries0.004120.738130.0014
Looping result0.00000.157010.0000
Template Total0.00189.010.0018
Template load0.00104.822210.0010
Template processing0.00084.184610.0008
Override
Cache load0.00073.383910.0007
General
dbfile0.00031.613480.0000
String conversion0.00000.066440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs