Forums / Developer / Multi-Part Content Class Form
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 Exponential 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
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 Exponential 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...
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.
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.
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 Exponential 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.