Custon form to create object

Author Message

Fred Gueho

Thursday 13 April 2006 10:33:08 am

I have this form in my front office :

- name
- activity (with an option list : engineer or assistant or chief)

I'd like to store the input in different contentObjets in a folder in my back office.
The contentObject would be created from a contentClass that has 2 attributes : name and activity.

I've done it in the guestbook creation of the tscm site tutorial, here :
http://ez.no/products/ez_publish/documentation/building_an_ez_publish_site/the_guestbook

But there was only 'ezText' attributes. Now, I need to have 'ezOption' attribute for my 'activity' field, and I can't figured out how to do that.

The problem is that options (of an ezOption attribute) are created in objects not classes. So when I create an object from my class, I can add any options I want. And I don't want the user to do that. I need them to choose among a premade options list.

So, Is it possible to have a form with option fields and to store user inputs in objects ?
How ?

Thank for your help.

Fred

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

Main resources:

Total runtime1.1698 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.0071 589.2734152.6406
Module start 'layout' 0.00710.0028 741.914139.4766
Module start 'content' 0.00991.1582 781.3906404.8516
Module end 'content' 1.16810.0016 1,186.24228.1484
Script end 1.1698  1,194.3906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2977160.0002
Check MTime0.00150.1299160.0001
Mysql Total
Database connection0.00100.082010.0010
Mysqli_queries1.129196.5206460.0245
Looping result0.00040.0384440.0000
Template Total1.138797.320.5694
Template load0.00210.180820.0011
Template processing1.136697.160920.5683
Template load and register function0.00020.016510.0002
states
state_id_array0.00110.095110.0011
state_identifier_array0.00170.141520.0008
Override
Cache load0.00170.1471160.0001
Sytem overhead
Fetch class attribute can translate value0.00090.076710.0009
Fetch class attribute name0.00060.049810.0006
XML
Image XML parsing0.00010.009210.0001
class_abstraction
Instantiating content class attribute0.00000.000210.0000
General
dbfile0.00060.0504100.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
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 5

Time used to render debug report: 0.0001 secs