Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#9 | date_required.gif | 7.73 KB | dodorama |
#3 | multiple-required.png | 3.55 KB | yched |
#2 | cck_9.patch | 7.21 KB | yched |
Comments
Comment #1
yched CreditAttribution: yched commentedThis 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...
Comment #2
yched CreditAttribution: yched commentedAttached 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)
Comment #3
yched CreditAttribution: yched commenteddemo 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...
Comment #4
dodorama CreditAttribution: dodorama commentedThis 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.
Comment #5
yched CreditAttribution: yched commented@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 ?
Comment #6
dodorama CreditAttribution: dodorama commentedYou'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.
Comment #7
yched CreditAttribution: yched commentedOK
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 :-) )
Comment #8
yched CreditAttribution: yched commentedSay what you do, do what you say...
Comment #9
dodorama CreditAttribution: dodorama commentedKaren 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'.
Comment #10
yched CreditAttribution: yched commentedI 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.
Comment #11
(not verified) CreditAttribution: commented