multiple values and CONTENT_HANDLE_MODULE

Ozeuss - October 19, 2008 - 23:12
Project:Content Construction Kit (CCK)
Version:6.x-2.0-rc9
Component:content.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

It's seems from the CCK code, that when you want to handle multiple values on your own, content.node_form.inc defaults to displaying your element only a single time. It would be great if there was a callback implemented (like _default_value) for modules that want to use CONTENT_HANDLE_MODULE.

#1

yched - October 20, 2008 - 12:38
Status:active» postponed (maintainer needs more info)

'multiple values' => CONTENT_HANDLE_MODULE in hook_widget_info() is intended to be used by widgets that are inherently multi-valued : a select list, a list of checkboxes, a gmap where you click to select locations... One instance of the widget is enough to select multiple values.

Could you expand on your use case and why you need to opt-out of the default management of multiple values ?

#2

Ozeuss - October 25, 2008 - 10:27

For the module I'm maintaining (http://drupal.org/project/office_hours) the drag and drop is unnecessary- it makes more sense using 7 fixed fields. I guess there might be other use cases.

#3

Ozeuss - October 27, 2008 - 12:58

Should i offer a patch for this? will it be implemented?

#4

Ozeuss - October 30, 2008 - 13:34
Status:postponed (maintainer needs more info)» active

#5

markus_petrux - November 7, 2009 - 16:36
Status:active» won't fix

I know this is an old issue, but another one made me find it. See #626240: CCK Pager and CONTENT_HANDLE_MODULE.

Well, I think CCK does not need to be patched. Your widget could tell CCK multiple values are managed by the widget itself, then your widget expands to 7 form elements itself.

 
 

Drupal is a registered trademark of Dries Buytaert.