Feedback form change...

Author Message

Andy Boston

Thursday 25 October 2007 7:12:53 am

I copied the "Feedback Form" class and changed it's name to "Consultation Form" and identifier to "consultation" with a view to add more information collector fields later.

I added it to the menu.ini through the admin so it shows in the top menu when used but the "Submit" button stopped showing and it just shows the recipient address instead.

Does anyone have a clue what I've done wrong???

Łukasz Serwatka

Friday 26 October 2007 12:01:48 am

Did you create override rule for that new content class that points to new template (copied from feedback_form.tpl)?

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

Andy Boston

Friday 26 October 2007 1:33:59 am

Nope I didn't.

How do I do that? Is there a document that explains it?

Andy Boston

Monday 29 October 2007 4:07:58 am

I've copied form.tpl and saved it as consultation.tpl

It's in \extension\ezwebin\design\ezwebin\templates\content\collectedinfomail\ which is probably the wrong place to have it.

Can anyone tell me the path of where it should be and how to define it in an override???

Łukasz Serwatka

Monday 29 October 2007 6:14:37 am

Hi Andy,

Copy extension\ezwebin\design\ezwebin\override\templates\full\feedback_form.tpl to
extension\ezwebin\design\ezwebin\override\templates\full\consultation_form.tpl

Then edit extension\ezwebin\design\ezwebin\override\templates\full\consultation_form.tpl and add code to display your new attributes.

In override.ini.append.php for public siteaccess add new rule:

[full_consultation_form.tpl]
Source=node/view/full.tpl
MatchFile=full/consultation_form.tpl
Subdir=templates
Match[class_identifier]=consultation_form

Make sure that consultation_form is correct class identifier (I guessed it ;)

Clear all the cache and re-load page with your new form.

Hope that helps.

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

Andy Boston

Monday 29 October 2007 9:08:16 am

Hi Łukasz,

Many thanks for the full explanation, I'll give that a go. :-)

Andy Boston

Monday 29 October 2007 10:10:59 am

Erm... tried it... cleared the cache... all seemed to be working fine...

Went back to administration interface to change the priorities and the center pane of it had disappeared :-o

Any suggestions ???

Greg McAvoy-Jensen

Monday 29 October 2007 11:52:33 am

You're missing the center pane of the admin interface? Not good. I'm not familiar with that problem, but the first thing I would do it turn on debug output for the admin siteaccess. You should be able to do this from the right side of the admin interface. If you can't, you can edit the site.ini.append.php file in the admin directory under settings/siteaccess/.

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

Andy Boston

Monday 29 October 2007 1:12:14 pm

It was the override.ini.append.php file in the /settings/override directory that caused the problem.

My fault, I edited the wrong one :$

Which override.ini.append.php should I edit and where is it???

Greg McAvoy-Jensen

Monday 29 October 2007 1:39:57 pm

The override.ini.append.php file for the public site access can be found in this way:

1. Check yoursite/settings/override/site.ini.append.php. It should have a block called [SiteSettings], and a parameter called DefaultAccess. Remember the DefaultAccess.

2. Go to yoursite/settings/siteacccess. Then go into the directory with the same name as the DefaultAccess. There you should find the proper override.ini.append.php.

I'll offer a question back for Łukasz or anyone else who knows. While we can easily place custom templates inside the ezwebin extension, if we ever upgrade that extension they would be lost. Would a best practice be to create another extension (to run together with ezwebin) and put our custom templates there?

If so, what's the best way to make sure our extension's templates (probably called from settings/siteaccess/name-of-public-siteaccess) take priority over ezwebin's (whose extension is called in settings/override)?

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

Andy Boston

Tuesday 30 October 2007 2:36:50 am

Apparently, my site access is [eng] so I edited the override.ini.append.php in the appropriate directory and uploaded it but the new form still doesn't work properly.

It's back to the original problem of not acting like a form :-|

Andy Boston

Monday 05 November 2007 3:13:46 am

So what's the correct way of doing this?

Is it to copy, edit, rename and upload the feedback_form.tpl (via FTP)

Make the additional entry into the siteaccess override file and upload it.

Then go to the admin and copy/create the new class so the admin knows what it is?

A step by step guide would be nice...

Thanks in advance :-)

Paul Wilson

Monday 05 November 2007 4:02:43 am

I'll write up some documentation of forms and publish in the next few days.

- Paul Wilson

Andy Boston

Tuesday 06 November 2007 2:09:31 am

Thanks Paul. That would be greatly appreciated :-)

Paul Wilson

Wednesday 19 December 2007 9:51:34 pm

The forms documentation took a little longer to get written and published than I'd thought.

It's now available here: http://ez.no/developer/articles/how_to_create_ez_publish_forms

Regards

- Paul Wilson

Andy Boston

Friday 21 December 2007 3:11:10 am

Looks like it was well worth the wait!

Thanks Paul :-)

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 31 2025 01:28:43
Script start
Timing: Jan 31 2025 01:28:43
Module start 'layout'
Timing: Jan 31 2025 01:28:43
Module start 'content'
Timing: Jan 31 2025 01:28:45
Module end 'content'
Timing: Jan 31 2025 01:28:45
Script end

Main resources:

Total runtime1.4976 sec
Peak memory usage8,192.0000 KB
Database Queries100

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.1250151.2109
Module start 'layout' 0.00560.0040 739.3359220.6875
Module start 'content' 0.00961.4871 960.02344,695.0859
Module end 'content' 1.49670.0008 5,655.109431.8594
Script end 1.4975  5,686.9688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2256160.0002
Check MTime0.00120.0805160.0001
Mysql Total
Database connection0.00070.049310.0007
Mysqli_queries1.348790.06061000.0135
Looping result0.00100.0686980.0000
Template Total1.442196.320.7210
Template load0.00210.141820.0011
Template processing1.439996.152520.7200
Template load and register function0.00140.093510.0014
states
state_id_array0.00210.139410.0021
state_identifier_array0.00230.152920.0011
Override
Cache load0.00200.1366830.0000
Sytem overhead
Fetch class attribute can translate value0.00210.137540.0005
Fetch class attribute name0.00230.1532200.0001
XML
Image XML parsing0.00500.335040.0013
class_abstraction
Instantiating content class attribute0.00010.0052320.0000
General
dbfile0.00410.2738380.0001
String conversion0.00000.000540.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
16content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
16content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
18content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 54
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs