Forums / Developer / ezOption question

ezOption question

Author Message

Clemens T

Saturday 24 September 2005 5:53:40 am

Hey all,
I want to collect information about what language the user prefers (a couple of options). I'm using the information collection system in eZ.

This manual:
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/datatypes/option

says I'm allowed to add options to my collection form if I use the 'option' attribute in my content class. But how can I provide the options, because the options provided down there like 'blue', 'green' etc. are added too, but I can't figure out where, and how etc.

I now get language:'There are no options' on my final page.

Hopefully someone can help me on this, it took me way to much time already!
Thanks,
Clemens Timmermans

Clemens T

Monday 26 September 2005 3:18:34 am

isn't there ANYone with an answer to this fairly easy question?
Thanks!
Clemens

Albert Hornos

Monday 26 September 2005 3:35:18 am

Hi Clemens!
I don't know if I understand quite right your question. But if you want to add options you should add option attribute to your content class.
Then, when you create the form you should add options to this form. You should add options just like you add the title or the other fields. First you should click the button add option and then fill the gap with the option you want.
If the question is how to collect the information, it's just like the others attributes.
I hope I've been a help, in other case, could you explain what's exactly what do you want to do?

Albert.

Clemens T

Monday 26 September 2005 3:35:42 pm

OK, I got it now,
the answer is:

In the class you create an optie which is an information collector.

In the instance of this class (the form/object/node) you edit the object, and you can ADD options for the radiobuttons (/dropdown box).

Greets,
Clemens

Marin Orlic

Wednesday 23 November 2005 10:59:14 am

Is there a way to specify the option list directly in the class definition? For instance, I need a rating system for content objects, allowing users to rate the object (for instance, rate each movie from 1 to 5).

It would be a hassle to force users to enter 1, 2, 3, 4, 5 each time a content object is created?

As far as I can tell, a suitable datatype for this would be ezoption, but it's values cannot be specified in class definition. I would prefer something like ezselection or ezrangeoption...

Any hints?

Thx,
M.

eZ debug

Timing: Jan 18 2025 11:06:30
Script start
Timing: Jan 18 2025 11:06:30
Module start 'content'
Timing: Jan 18 2025 11:06:31
Module end 'content'
Timing: Jan 18 2025 11:06:31
Script end

Main resources:

Total runtime0.9409 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 587.6094180.8438
Module start 'content' 0.00690.8119 768.4531536.2188
Module end 'content' 0.81890.1220 1,304.6719338.1094
Script end 0.9408  1,642.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.4500210.0002
Check MTime0.00170.1780210.0001
Mysql Total
Database connection0.00100.107410.0010
Mysqli_queries0.872292.70172020.0043
Looping result0.00200.21662000.0000
Template Total0.910696.820.4553
Template load0.00270.289920.0014
Template processing0.907996.490620.4539
Template load and register function0.00010.012710.0001
states
state_id_array0.00110.116010.0011
state_identifier_array0.00110.121620.0006
Override
Cache load0.00240.2502370.0001
Sytem overhead
Fetch class attribute can translate value0.00140.153840.0004
Fetch class attribute name0.00120.125750.0002
XML
Image XML parsing0.00060.061240.0001
class_abstraction
Instantiating content class attribute0.00000.001050.0000
General
dbfile0.00210.2196210.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs