Forums / Developer / Multi-Part Content Class Form

Multi-Part Content Class Form

Author Message

Alex Jones

Tuesday 01 July 2003 11:01:58 am

I recently posed a length question in the Design forum (http://ez.no/developer/ez_publish_3/forum/setup_design/designing_complicated_ecommerce_system_need_suggestions) which I believe comes down to a simpler question which might be best answered in this forum. How can I set up a Content class that presents the content editor with a multi-page form depending on their input. Specifically I would like the editor to have the ability to check a box or fill in a field to indicate that the additional page of fields needs to be filled out.

So, if the box is checked they are presented with another screen of information. If the box is not checked then the standard publishing workflow kicks in.

A step-by-step set of instructions would be immensely helpful as I am just now learning eZ publish and this is one of the first tasks I need to complete.

Thanks!

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Paul Borgermans

Tuesday 01 July 2003 11:08:44 am

At first sight, I would do it with DHTML with divs hiding the additional fields which become available with some javascript triggered function upon clicking on a check box.

Multiplage forms are not possible without writing some new workflow event which checks a field/checkbox.

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Alex Jones

Tuesday 01 July 2003 11:22:07 am

I had pondered the use of a hidden DIV solution, but would prefer one that works within the eZ Publish system to store the data already entered. I would be happy to write the new workflow event, except I haven't quite grasped how to do it in this way. Specifically, how do I tell a workflow event to go from one part of the class to another, or from class one to class two and then associate them? Do I set up a main product class and an alternate product class and then have the workflow decide whether or not to present the alternate product fields if the proper checkbox is checked? How do I ensure all of the data is associated with the same item?

Perhaps I am making this too complicated, but I haven't found any good examples of something like this. Perhaps I just need t otry to adaptthe Gift Wrapping example...

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Sven Ryen

Friday 04 July 2003 2:25:55 am

You could write a new module - that's what I ended up doing for a multipage registration process where the server needs to send and receive info from PayNet.

The module works flawlessly so far.

Perhaps I'll make a more abstract version of my module later this summer.

Alex Jones

Monday 07 July 2003 7:15:10 am

Hrrrm, well I guess I will dive into the documentation for creating new modules. It is good to hear that the method works.

Thanks!

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Andreas Adelsberger

Thursday 28 January 2010 8:21:50 am

I think writing a module is the best way to do this, but to me there is one question left.

What is the best approach to store the data?

- create on big eZPublish class with all the attributes and then create and modify an eZContentObject from this class

- or create one Class for each formpage and create and modify eZContentObjects from these classes

- or use seperate database tables and use PersistentObjects to store and edit the data.

What do you think or what did you choose?

Thanx Andi!

---------------------------------------
Styleflasher New Media OG
Websites. Games/Multimedia.

eZ debug

Timing: Jan 18 2025 02:59:10
Script start
Timing: Jan 18 2025 02:59:10
Module start 'content'
Timing: Jan 18 2025 02:59:11
Module end 'content'
Timing: Jan 18 2025 02:59:11
Script end

Main resources:

Total runtime0.7920 sec
Peak memory usage4,096.0000 KB
Database Queries207

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.7109180.8359
Module start 'content' 0.00540.6332 768.5469659.1016
Module end 'content' 0.63860.1534 1,427.6484341.0625
Script end 0.7920  1,768.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00470.5894210.0002
Check MTime0.00150.1938210.0001
Mysql Total
Database connection0.00070.085710.0007
Mysqli_queries0.701288.53152070.0034
Looping result0.00200.25652050.0000
Template Total0.767997.020.3840
Template load0.00210.262920.0010
Template processing0.765896.693020.3829
Template load and register function0.00010.013610.0001
states
state_id_array0.00100.130710.0010
state_identifier_array0.00080.095820.0004
Override
Cache load0.00180.2259350.0001
Sytem overhead
Fetch class attribute can translate value0.00140.176150.0003
Fetch class attribute name0.00190.237490.0002
XML
Image XML parsing0.00220.280650.0004
class_abstraction
Instantiating content class attribute0.00000.0026110.0000
General
dbfile0.01141.4404400.0003
String conversion0.00000.000530.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/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: 19
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs