Needs work
Project:
Explainfield CCK widget
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2009 at 11:17 UTC
Updated:
10 Jul 2010 at 09:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
brad.bulger commentedthis looks like it is by design but it makes the module unusable for us, which is a darn shame.
Comment #2
snufkin commentedhopefully i will look into the 6.x version in a short while when i got some time.
Comment #3
summit commentedSubscribing, please get this potential great module for D6 working please!
Thanks a lot in advance!
greetings,
Martijn
Comment #4
WorldFallz commentedThis is definitely a problem. I'm trying to investigate now, but I'm not to0 familiar with the cck api. So far, It doesn't seem as if explainfield is looking at the $field['multiple'] setting at all. The processing for multiple values is using a count() on the actual allowed values options. That seems incorrect to me.
The way I understand the 'multiple' column of cck fields is:
$field['multiple'] == 0 - means no multiples allowed and therefore the number of values is 1 (seems a little backwards at first glance, until you think about the fact that setting is named 'multiple').
$field['multiple'] == 1 - means 'unlimited' values
$field['multiple'] > 1 - the actual number of allowed values
I don't see any of this logic in the explainfield module. It simply does a text replace in the html for radios/checkboxes. I'll try to keep plugging away.
Comment #5
WorldFallz commentedI think i've found it. Patch attached.
Comment #6
snufkin commentedYeah, the statement in #2 is absolutely correct. This module does not implement multiple properly, the current solution is a hack. The patch does resolve it to a certain degree (form error is thrown still on the configuration form when selecting multiple values), but I think we need to find a solution that implements the multiple option just like the cck select widget.