If allowed number of values is set to anything other than 1 then rather than displaying the options as checkboxes a repeating field type with multiple instances of the radio options list is displayed. Drupal version 6.10. Screenshot demonstrating 'Unlimited' option attached

Cheers.

Comments

brad.bulger’s picture

this looks like it is by design but it makes the module unusable for us, which is a darn shame.

snufkin’s picture

hopefully i will look into the 6.x version in a short while when i got some time.

summit’s picture

Subscribing, please get this potential great module for D6 working please!
Thanks a lot in advance!
greetings,
Martijn

WorldFallz’s picture

This 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.

WorldFallz’s picture

Status: Active » Needs review
StatusFileSize
new1.13 KB

I think i've found it. Patch attached.

snufkin’s picture

Status: Needs review » Needs work

Yeah, 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.