red asteriks (field required) missing for multiple values field.
And the warning message doesn't mention the exact required field but a generic "field".

I think the one above, other bugs,and missing features, makes the multiple values option pretty unusable.
Why not strip it down until a revision?

P.S .and I forgot to mention the fact that for certain widgets (select list and radios) it simply doesn't work.

CommentFileSizeAuthor
#9 date_required.gif7.73 KBdodorama
#3 multiple-required.png3.55 KByched
#2 cck_9.patch7.21 KByched
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

This is still true.
This is because most widgets wrap multiple-values-fields inside a fieldset, whose title is the field label.
The textfields themselves have no label, and therefore can't the usual visual clue (red asterisk) the the field is required...
We have to find the UI idea to fix this. I'd propose to drop the fieldset and add the label to the first textfield, but that might not make a consensus. Ideas / opinions welcome.

PS : I don't think this disqualifies the whole multiple value thing, though...

yched’s picture

Status: Active » Needs review
FileSize
7.21 KB

Attached patch (4.7) with a slightly different proposition :
keep the fieldset, but with an empty title, and attach the field label to the first textfield
It applies to the textfield-based widgets in cck-bundled number, text, noderef and userref modules.

Pros : keeps the visual fieldset structure, keeps a nice place to put the field description
Cons : the fieldset with empty title can not be made collapsible (they are not currently, but some people might want to tweak that in their own _form_alters)

yched’s picture

FileSize
3.55 KB

demo screenshot : a required multiple field, and a non-required multiple field

Yeah, patch is for 4.7 and screenshot is 5.0 Garland theme, go figure...

dodorama’s picture

This is nice.

P.S. But I still don't see a use case for multiple values especially cause there's no way to adjust the quantity, and you can always just add more fields if you need more and have complete control over it.

yched’s picture

@dodazzi : I don't agree. There ARE use cases for multiple values as they stand now. What the 'multiple' area mostly needs is clarification and explanation about what you should / should not expect from them. After this is agreed, there might or might not be some improvements / added features.

That is another debate, that we cannot delay much longer, but that would probably better take place in groups.drupal.org.
Let's focus on the much tinier "required fields display" here : commit or not commit ?

dodorama’s picture

Status: Needs review » Reviewed & tested by the community

You're right.
So I tested it and works.
I'm not a great fan of fieldsets but I guess there must be a reason for using them. So I think the patch is ready to be committed.

yched’s picture

OK
This patch deals with cck-bundled field modules. If we want to keep the UI consistent, contrib field modules will have to reflect this as well. Before committing this, I'd like to hear from karen and dopry, whose date and imagefield modules probably have the most elaborate needs in terms of field forms UI.

So I'm setting this back to 'needs review' (no offense intended dodazzi :-) )

yched’s picture

Status: Reviewed & tested by the community » Needs review

Say what you do, do what you say...

dodorama’s picture

FileSize
7.73 KB

Karen solved it in her date.module a long ago. See screenshot to see how it looks.
Dopry's imagefield doesn't show the red asterisk at all (even for non multiple values). This is why, as you said, he uses a fieldset to wrap the field. One solution could be to avoid using fieldsets for single values and introduce it just for multiple values as you did.
Again, I'm going OT but this could be an opportunity to think about UI guidelines for CCK fields and solve the 'asterisk issue'.

yched’s picture

Status: Needs review » Fixed

I went ahead and committed this.

It is now up to other contrib fields/widgets maintainers to ensure they provide a proper UI for "multiple / required" fields.

Anonymous’s picture

Status: Fixed » Closed (fixed)