[support] Complex CCK data type - multiple fields

Eric Mckenna eric.mckenna at gmail.com
Thu Jul 5 12:43:52 UTC 2007


Can you explain a little more.  I'm having trouble making out what you 
are trying to do.
Why does adding these fields to your "book" node not work?
And what do you mean by a "complex CCK data type"?

J-P Stacey wrote:
> Hi,
>
> How would I go about building a complex CCK data type? The one I have in
> mind might be e.g. the different formats available for a "book" node:
>
> 	Format		Width	Height	Depth	Weight
> 	----------------------------------------------
> 	Hardback	15cm	24cm	2cm	14oz
> 	Trade pback	14cm	22cm	1.5cm   10oz
> 	Paperback	10cm	15cm	1cm	6oz
>
> Should I store each row as a flattened text field with delimiters e.g
> "Hardback&15&24&2&14", and let hook_widget() unflatten it prior to
> editing? Or can CCK store complex data types unflattened?
>
> Given the form chunk to edit each row would be five input fields, can
> hook_widget() cope with making this whole block "multiple" easily enough?
> Would it need to be defined in form API as a multiple'd fieldset?
>
> Cheers,
> J-P
>   



More information about the support mailing list