Here's the problem...
I'm developing of hotel/motel information website. The end-users want to be able to add all the basic information about their particular accommodation via a single add/edit page. Easy enough so far, a bit of CCK, and most of the fields required are covered.
The tricky bit is that they also want to be able to add information about the various rooms available at each hotel/motel. Each room has multiple fields (no. of beds, price, suite/standard), and they want to be able to add multiple rooms to the one accomodation listing. So, the node has info along the lines of...
-HOTEL
--name
--description
--cck-image[1]
--cck-image[2]
--cck-email
--cck-etc...
--room[1][name]
--room[1][price]
--room[1][beds]
--room[2][name]
--room[2][price]
--room[2][beds]
If it was up to me, I'd be telling them to have a separate content type, and just use nodereference to make the link between the accomodation parent, and the room child. But the client is adamant they want to be able to do all the admin for one accomodation listing via the one admin page.
Ideally, I could create a fieldset that'd work similarly to other CCK fields in that I could define it to behave as a multiple - ie. add one room's details, and a new blank room form appears upon the submission of the first.
But, not sure how to achieve this. Any suggestions welcome.
Comments
Multi-field
From the point of view of client usability, I think your customer is right.
I also had a similar need and looked into it.
As there is no nesting of fieldgroup within a fieldgroup (and multiple values option for a fieldgroup), I think that currently the only way is to implement a module that creates a compound field type that includes several sub-fileds (like the address_cck module) and then have it to be with the multiple values option.
A shortcut for doing this would be to take the 'address CCK' module and change it to other sub-fields that you need but first check why the address_cck does not provide the multiple values option, maybe it is problematic with such compound fileds...
This functionality of multiple instances of a "fieldset" within a fieldgroup or a content type is indeed something we should have in CCK.
---
http://www.openify.com - Drupal Services in Israel
Any progress in this please?
Any progress in this please? Is there a multiple instances of a fieldset cck module yet?
Thanks for answering in advance,
greetings,
Martijn
Solution
found this older thread via Google when I was looking for something similar, and others may too, so:
I think this functionality now is easily realized with CCK 3.0 and it's multigroup module (currently only available as a -dev).
see also http://mostrey.be/cck-3-introducing-multigroup-module
Another option would be flexifield
http://drupal.org/project/flexifield