When setting up a Node Reference field (to take one example), the admin can select the maximum number of nodes which may be referenced using that field. The current settings for the maximum are 'Unlimited' and 1 to 10. I would like to suggest adding the numbers 20 to 100 by 10s as this would be a very useful enhancement. There are cases where 10 nodes are not enough but I do not want to set it to 'unlimited'. Having the extra numbers gives more control and better flexibility.
The attached screen grab shows the drop-down list before and after, and the attached patch makes the following one-line change to $form['field']['multiple'] in content.admin.inc
'#options' => array(1 => t('Unlimited'), 0 => 1) + drupal_map_assoc(range(2, 10)),
becomes
'#options' => array(1 => t('Unlimited'), 0 => 1) + drupal_map_assoc(range(2, 10)) + drupal_map_assoc(range(20, 100, 10)),
Jonathan
Comment | File | Size | Author |
---|---|---|---|
#138 | D7-cardinality-680546-138.patch | 10.14 KB | Pancho |
#135 | allowed_number_of_values.png | 15.44 KB | Pancho |
#128 | 680546-128.patch | 9.07 KB | swentel |
#127 | 680546-127.patch | 9.08 KB | swentel |
#127 | interdiff.txt | 2.97 KB | swentel |
Issue fork drupal-680546
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
jonathan1055 CreditAttribution: jonathan1055 commentedThis enhancement was in response to image module issue #581174: Set the allowed number of image attachments. #21 and #22. I would suggest it would be a useful extra for many modules. Please consider adding it, as it would appear a simple change, or please explain if it is not simple and I am missing the point.
Jonathan
Comment #2
El Bandito CreditAttribution: El Bandito commentedAnyone got a view on whether this patch is a sensible approach ? Anyone successfully used in the live environment ?
Cheers
El
Comment #3
jonathan1055 CreditAttribution: jonathan1055 commentedWell, I'm using it in a live environment but I guess you may have assumed that already ;-)
I hope it can be included, as it is such a simple patch but with a great increase in usefulness. As more modules start to use CCK node reference instead of rolling their own code, this could become even more of a required enhancement.
Jonathan
Comment #4
mattiasj CreditAttribution: mattiasj commentedi think this would be a great feature, works well!
Comment #5
b0r7 CreditAttribution: b0r7 commentedIt was exactly what i needed atm. thanks for the patch works perfectly.
Comment #6
olmomp CreditAttribution: olmomp commentedIn Drupal7, this can be changed in modules/field_ui/field_ui.admin.inc
The line that defines the range of values says now '#options' => array(FIELD_CARDINALITY_UNLIMITED => t('Unlimited')) + drupal_map_assoc(range(1, 10)),
Comment #7
johnv@El Bandito,
IMO the proposed solution is OK for a simple modification.
an alternative is to change the widget from 'select list' to an 'textbox'. An empty field then means 'unlimited'.
(This is also proposed in #680616: Setting a custom "number of values" for a multi-value ImageField?)
This is a bit more complicated, and would be the better way for definitive approach.
Also I'd like to set the 'number of values' different per Content Type, rather then creating different fields that only differ in this respect. I'm not sure if this is possible.
Comment #8
KarenS CreditAttribution: KarenS commentedThis patch makes no sense for version 7.x-2.x. CCK does not control any of this in D7. And if we change it in D6, the change won't work in D7 and you will have data and settings that may not migrate correctly.
Comment #9
Fidelix CreditAttribution: Fidelix commentedSorry for reviving the issue:
Anyone knows if there is something for D7 in contrib?
Comment #10
ispboy CreditAttribution: ispboy commentedI found the only way in D7 is: custom_formatter.
Comment #11
philsward CreditAttribution: philsward commentedComment #6 works for me... I don't like the idea of having to remember to change that every time there is a core update though...
I know the core team worked very hard on D7 and I'm not trying to bash their work, but it's stuff like this that was so simple in D6 CCK, that has now become a pain in the ass with D7 fields... I realize there has to be a give and take somewhere, but I feel like a lot of the work that was put into CCK that made it such a wonderful project, was stripped out when it was incorporated into D7. Now we are left with "work-arounds" to things that were previously possible.
Anyone else kinda frustrated with the approach that was taken with D7 fields in comparison to D6 CCK? I'm sorry but a website that is created today, is not going to be the same website in two years. Things change, people learn and then go back to tweak their initial design. It's almost like the idea in the sprints was to lock things down to make it easier and safer for the new guy, except that the new guy doesn't know enough about what he's doing, to be able to properly sit back and "design" the site for what it will become in two years.
Sorry for the rant but I've run into more than one situation with fields where I can't do what I used to be able to do, just like this topic is describing. I'm not usually one to complain but I'm hoping that the squeaky wheel will eventually get some oil in this area of Drupal.
Comment #12
charlie-s CreditAttribution: charlie-s commentedHow about something like:
UPDATE field_config SET cardinality = 15 WHERE field_name = 'field_my_field_name'
The way I understands Fields in D7 is that they can be configured in code and the UI is in all respects supplemental to defining things in code, regardless of whether or not it's what is used 99% of the time.
So with all that in mind, why not just change the field configuration to use 15 in the field's configuration?
Comment #13
jnettikThe approach in #12 works but the change isn't reflected in the settings. Couldn't they be easily overridden?
Why not just do a hook_form_alter() and changing the field to a textfield? Would that break something later on?
Comment #14
charlie-s CreditAttribution: charlie-s commentedA form alter should be fine; the cardinality is nothing more than an integer. The only thing that's not playing nice here is that the form element is a select and can't realistically support a limitless number of values.
A select with 1-10 + unlimited is good for your average user, however I would prefer a text field where I enter a number.
Comment #15
philsward CreditAttribution: philsward commentedCouldn't there be a simple "Field Settings" page that would allow overall customizations such as this? I don't really know what other customizations could be done, but I'm sure somebody could think of one : )
Comment #16
jramby CreditAttribution: jramby commentedHere's a patch, can anybody test it?
Comment #17
jramby CreditAttribution: jramby commentedThis issue belongs to drupal core field system I think.
so I created this issue : http://drupal.org/node/1588624
Comment #18
jonathan1055 CreditAttribution: jonathan1055 commentedThis issue is marked as 'closed (wont fix)' so it does not show up on members dashboards, even after an update. So if you want to continue this thread you will need to alter the status.
Does #1588624: Backport custom field cardinality to D7 replace this issue? If so, its ok to leave this thread closed. But I was not asking for unlimited, I wanted to specify a higher top limit.
Comment #19
jramby CreditAttribution: jramby commentedYes, #1588624: Can field cardinality (number of values) range be other than 1-10, unlimited ? replaces this issue. The issue title maybe not clear enough, but the patch specifies a "higher top limit" by letting the user type what he want as "number of values" as talked in #14.
So may I change the status to "fixed" because the problem isn't here but in the drupal core field system.
Comment #20
jonathan1055 CreditAttribution: jonathan1055 commentedHi,
OK in which case this issue can be moved into Core field system, as it contains more of the useful background, but nolonger relates to CCK. If you re-post your latest patch here, then the new issue #1588624: Backport custom field cardinality to D7 can be marked as 'closed(duplicate)'.
Comment #21
marcingy CreditAttribution: marcingy commentedFeatures need to go into d8 first.
Comment #22
johnvI have tested #16. It works nicely, however it lacks validation.
- You can enter an invalid number like '3sdf'.
- When saving, no error appears, and the value is not changed.
Compare this with a Number field:
- You can enter an invalid number like '3sdf'.
- When saving, the error "Only numbers are allowed." appears, and the value is not changed.
I considered making the cardinality to a Number field, but that introduces a dependency on the Number module.
Comment #23
johnvAn addition on teseting #16:
The number 0 is allowed, which was not in the old situation, generating an indetermined situation.
Comment #24
jramby CreditAttribution: jramby commentedHi,
I've added a validation code for the 0 value. Thanks for testing.
Comment #26
jramby CreditAttribution: jramby commentedThe last patch uploaded is for Drupal 7
Comment #27
star-szrAs @marcingy mentioned, this would need to be patched in Drupal 8 first, per the backport policy.
Comment #28
star-szrSee also #1331110: Change "Number of values" on field_ui_field_edit_form() to textfield?.
Comment #29
kumkum29 CreditAttribution: kumkum29 commentedHello,
with #6 it's ok for me. But is it possible to create a new function in template.php not to change the code in Drupal core? If we update Drupal, we lost the patch.
Thanks.
Comment #30
johnv@jramby, the correction in #24 is in custom module 'field_cardinality'. The original patch #16 was in core module 'field_ui'.
Comment #31
manoloka CreditAttribution: manoloka commentedWhat about for D6?
Comment #32
swentel CreditAttribution: swentel commentedHere's a patch that uses the #states API to show/hide an extra number field if you select 'Other' in the select field.
Comment #33
swentel CreditAttribution: swentel commentedTagging also
Comment #34
swentel CreditAttribution: swentel commentedAdded validation function. Played around a bit with container inline, but I suck at it :)
Comment #35
yched CreditAttribution: yched commentedThat looks great !
One newline too many :-)
Should be <= 10, no ?
I'd also suggest reducing the number of values in the select - 1 to 4 or 5 should be enough, then you use "More".
(putting that value in a variable would probably help for adjustments and make the code clearer)
We should try to bring a FAPI / UI guru to help with the container inline stuff, I suck at it too :-(
Comment #36
swentel CreditAttribution: swentel commentedI actually got it working! :)
Didn't attach an interdiff as that would be almost as big as the patch.
Comment #38
Bojhan CreditAttribution: Bojhan commentedThis looks great! Is a great feature, that I'd always thought we missed.
Comment #39
swentel CreditAttribution: swentel commentedFixed tests + added some additional tests for the new element.
Comment #40
swentel CreditAttribution: swentel commentedWoops, remove tag.
Comment #41
swentel CreditAttribution: swentel commentedBetter patch so in case something else than a numeric value is submitted to the 'other' field, the number validation will show a nicer error message. I think this one can be set RTBC.
Comment #42
yched CreditAttribution: yched commentedAw sweet, that's pure loveliness !
Bojhan approves the UI, code is fine, let's get this in :-)
I have one minor nitpick, but that's not enough to hold a commit.
There's no technical reason to restrict #min = 6 on the textfield. I could pick "more" and finally decide to enter 3, it would still be valid and nothing would break. We have no reason to "force" the user to be consistent where we could easily be forgiving.
(although #min needs to be at least 1 of course)
Comment #43
swentel CreditAttribution: swentel commentedMakes sense indeed, old-school interdiff!
Comment #44
star-szrThis is awesome! Here's some very minor docs cleanup and re-wrapping of comments at 80 chars.
Comment #45
catchWhat's wrong with #type => 'container'?
Also is there a generic 'select or other' issue somewhere? It'd be good to see if we could implement this as a fapi type rather than the two fields.
Comment #46
swentel CreditAttribution: swentel commentedUsing #type container made the form spacing go completely borked iirc. I'll recheck again and post screenshots with the differences between the two.
There's a generic select or other, but no patch at all - http://drupal.org/node/1207060 . There doesn't seem to be much excitement around it either and http://drupal.org/project/select_or_other is also a really nice and fully coded alternative that has support for field api system as well. So I'd rather just go ahead, but that's just me of course :)
Comment #47
swentel CreditAttribution: swentel commentedHow the hell did that happen.
Comment #48
swentel CreditAttribution: swentel commentedOh man.
Comment #49
XanoWhat about replacing the select element by a checkbox for "unlimited"? The select and textfield elements have a functional overlap which reminds me of the date selector we have/had in core: a select element with loads of possible options and one option for custom formats that made a textfield pop up. People tended to overlook the "custom" option.
Comment #50
swentel CreditAttribution: swentel commentedThe textfield is hidden with states when necessary, so it works fine as intented.
Comment #51
XanoPerhaps use the same wording for the select option as for the number field title?
We don't use "please" in UI texts (http://drupal.org/node/604342)
I'm not saying it doesn't work as intended. I'm only saying we have/had similar behavior with date formats which didn't work as well as expected, and that there is an overlap between what the select and textfield elements offer. My suggestion was to use a checkbox instead of a select list (so the #states behavior can be kept).
Comment #52
dodorama CreditAttribution: dodorama commented#51 Makes sense to me. In terms of usability a checkbox seems more appropriate.
Comment #53
swentel CreditAttribution: swentel commentedLet's keep it originally, bojhan already approved, no need to bikeshed this again.
Comment #54
yoroy CreditAttribution: yoroy commented@dodorama: those are radio-buttons there in your mockup. Also, this is primarily about limiting the amount of values, so any UI that puts the 'unlimited' option first is a no-go imo.
The feature itself is the big win here, not the UI polish. Lets do that in a follow-up if you think it's needed.
Needs work for catch's remarks in #45.
Comment #55
dodorama CreditAttribution: dodorama commented@yoroy You're 2 times right. those are Radios, and we want this in and then eventually follow-up.
Comment #56
swentel CreditAttribution: swentel commentedChanged the form error message to the title of 'Number of values' element. I left 'Custom value' there because then it won't upset screen readers as such.
As why I use the item type instead of container is for a technical reason: container can't handle the #title and #description property. see screenshots:
container
item
Comment #57
yched CreditAttribution: yched commentedLooks good. Setting back to RTBC.
Comment #58
catchOK please add a comment as to why this can't use the container type, I'm sure it won't just be me who sees that and wonders.
I added a comment to #1207060: Interface pattern for custom option as alternative to predefined choices but fine with putting this in then potentially converting it to a generic element if we end up with one.
Comment #59
swentel CreditAttribution: swentel commentedComment #61
star-szrNitpick: Maybe "title or description properties" would be better?
The test needs to be updated now, it's still looking for "Please enter a number."
Comment #62
swentel CreditAttribution: swentel commentedCrap, forgot to change the assert text too.
Comment #63
swentel CreditAttribution: swentel commented@Cottser - crosspost hehe. Could be that 'properties' is better, English is not my mother tongue, so I probably miss some details now and then, feel free to reroll :)
Comment #64
star-szr@swentel - Here's the proposed change to that comment :)
Comment #65
yched CreditAttribution: yched commentedAnd back.
Comment #67
swentel CreditAttribution: swentel commented#64: 680546-62.patch queued for re-testing.
Comment #68
swentel CreditAttribution: swentel commentedAnd back again.
Comment #69
webchickLooks like catch has been involved in this one.
Comment #70
catchOK that looks good. Committed/pushed to 8.x.
Comment #71
sunMmmm, this change led to a quite confusing form value structure. The 'container' in there does not really make sense.
Attached patch fixes that.
Comment #73
yched CreditAttribution: yched commentedTrue, the container should be transparent to the structure of the resulting form values.
#71: drupal8.field-cardinality-other.71.patch queued for re-testing.
Comment #75
swentel CreditAttribution: swentel commented#71: drupal8.field-cardinality-other.71.patch queued for re-testing.
Comment #76
swentel CreditAttribution: swentel commentedOk, this re-test will fail again, will post new working patch after the bot comes back.
Comment #78
swentel CreditAttribution: swentel commentedComment #80
swentel CreditAttribution: swentel commented#78: drupal8.field-cardinality-other.78.patch queued for re-testing.
Comment #81
yched CreditAttribution: yched commentedYup, better now :-)
Comment #82
sunComment #83
catch#78: drupal8.field-cardinality-other.78.patch queued for re-testing.
Comment #85
tsvenson CreditAttribution: tsvenson commentedYes please lets get this in, and also backport it to D7.
Is the custom option going to be called "More" as in the screenshot in #56? I looked at the latest patch, but couldn't find the label text for the custom value.
If it is "More", then that is a not so good choice from an UX perspective. Simply using "Custom" in the drop down would be best.
But maybe I have misunderstood the screenshot?
Comment #86
star-szrI'll work on a reroll.
@tsvenson - There was a commit made to 8.x already (see #70), now we're working on some tweaks on top of that commit. I believe the text is currently "More".
Comment #87
tsvenson CreditAttribution: tsvenson commented@Cottser - Ahh, did look for if a commit had been made, obviously I didn't catch that :)
Would be great if you could post screenshots of the UI, including with the drop down in full view. That would give me enough to really understand the UX going on here. Particularly it will give me a better idea of how that "More" is used.
Comment #88
star-szr@tsvenson - As far as I know #78 doesn't change any UI, so here are some screenshots from D8 HEAD.
Comment #89
tsvenson CreditAttribution: tsvenson commented@Cottser - Thanks for so quickly posting those screenshots.
"More" is definitely the wrong choice here. More for me translates into that something is missing from the dropdown. Also, when it is selected it says "More 6" and what does that actually mean, more 6:s, more than 6???
In my opinion "Custom" is the common term used for this and it also makes a lot more sense since above you have static option, unlimited included, and then Custom wont cause any confusion.
Great if you can include that in the follow up patch your working on.
Just to confirm. Is the input field always shown (since its visible with a 6 in the screenshot)? It should only be visible when the Custom option is selected.
Comment #90
swentel CreditAttribution: swentel commentedThat's the case right now.
I can live with 'Custom', doesn't really matter to me.
Comment #91
tsvenson CreditAttribution: tsvenson commented@swentel - Thanks for clarifying that, it wasn't obvious for me just looking at the screenshot.
Comment #92
star-szr@tsvenson - See also #1207060: Interface pattern for custom option as alternative to predefined choices where a few ideas are bouncing around. I'm fine with changing to 'Custom' for this patch though, I'll incorporate that into the reroll.
Comment #93
tsvenson CreditAttribution: tsvenson commented@Cottser - Thanks for pointing me to that issue. Particularly since it has the ambition to create a universal standard.
Also thanks for the quick replies and turnaround of this issue.
Comment #94
star-szrHere's the reroll, the only change from #78 is changing the UI text from 'More' to 'Custom'.
Comment #95
star-szrThe "Custom" change didn't get included in that patch, so here is the updated patch with an interdiff thrown in for good measure.
Comment #96
star-szrAhem.
Comment #97
yched CreditAttribution: yched commentedYeah, sorry, I was the one who asked for "More" rather than "Other / Custom". I'm fine with "Custom" if UX people like it better.
A couple minor points on #96 :
['cardinality']['cardinality'] is not too great. 'cardinality_container' ? 'cardinality_wrapper' ?
Can we avoid the "by ref" magic ? I find it more confusing than useful here, and it's actually not needed at all for $cardinality_other.
Comment #98
tsvenson CreditAttribution: tsvenson commentedNo need to be sorry @yched. You do an absolutely awesome job with development and have my outmost respect to that. I'm just glad to help out with areas where my skills and experience can do good, hopefully allowing you to be able to focus on what you like best.
Comment #99
Xano#96: 680546-96.patch queued for re-testing.
Comment #100
xjmSo, first of all, the past 30 comments should have been in a followup issue. We really shouldn't reopen issues for non-rollbacks.
Secondly, I think we're taking the wrong approach here. Having 1-5, OR more, OR unlimited in the same box is confusing, redundant, and unnecessary. Just use the number widget by default, and let it select anything from 1 to whatever the user wants. Toggle unlimited on or off somehow.
The number widget makes selecting 1-5 completely redundant. We can reduce the complexity, the number of clicks, and the general WTF by losing the select box entirely and just doing something like this:
Maximum number of values
Edit: Also, folks in IRC keep referencing #1207060: Interface pattern for custom option as alternative to predefined choices like it's a magic bullet, but I don't think that this should even NEED that pattern. It's a conditional field, not a "select or other."
Comment #101
swentel CreditAttribution: swentel commentedMakes sense, I'll code this later
Comment #102
xjmI'm told my ASCII art is unclear. There are two fields: A single-value select dropdown, and a number doodad that is conditional on the value of the first. So you'd see one of two things:
Maximum number of values
[ Restrict number of values |v]
(select box)[ 5_ (^v) ] values
(number field thing)Or:
Maximum number of values
[ Unlimited values |v]
(select box)Edited to be not-wrong.
Comment #103
xjmxpost
Thanks swentel!
Comment #104
xjmAlso adjusting the title since the current one is misleading. :) Next time, let's leave the issue fixed and file a new one, so that there is a 1:1 title to commit relationship unless it's a big enough deal to roll back the change.
Comment #105
jibransomething like that http://jsfiddle.net/LXtZU/
Comment #106
jibranxpost
Comment #107
swentel CreditAttribution: swentel commentedOk, this cleans up the container form structure and also addresses the select box problem, to be fair, this makes much more sense indeed.
- edit - This also simplified the tests a lot.
Comment #109
yoroy CreditAttribution: yoroy commentedTried the patch, I think it works pretty well.
- would be good to size the number field a bit smaller
- screenshot has some wording suggestions: lets not talk about users at all, use limited/unlimited and not repeat some of the keywords etc.
(wrong screenshot)
Comment #110
yoroy CreditAttribution: yoroy commentedComment #111
swentel CreditAttribution: swentel commentedFixes the test and implements the suggestions from #110.
Setting the size seems to be impossible though for the number element.
The validate function could also be removed, yay for cleanup!
Comment #112
klonosThank you people for taking care of this issue this way! ...and @yoroy with the limited/unlimited simplification idea: just brilliant man!! ;)
Comment #113
sunThis looks great. Also love @yoroy's simplification.
There's only one trap here: The description makes it sound as if the "Add another item" button would only appear when "Unlimited" is selected. But that's not the case. Field widgets always progressively advance into more rows, unless the limit is smaller than 3 (I believe) — i.e., you always get an "Add another" button, unless the widget shows the maximum allowed items that can be entered already.
I wonder whether we need any description at all though?
Isn't "Unlimited" and "Limited" (+ value) crystal clear already?
@swentel: Regarding #size, just add 'size' to
form_pre_render_number()
, please. The HTML5 DOM Interface for input type=number still declares it asattribute unsigned long size
. I've done exactly that change for some other patch in the queue already, but can't remember which one. Happy to do it here.Comment #114
swentel CreditAttribution: swentel commented@sun - tried adding the size, but doesn't seem to have a lot of effect - see attached patch - unless I'm doing something extremely stupid.
Regarding the text of 'unlimited' - the behavior is actually kind of weird after some testing:
- text - limited set to x = x textfields on the form
- image - limited - 1 image field, new one comes on automatically after upload
- text unlimited : 'add another item' button
- image unlimited : no 'add another item' button, but comes automatically after upload
No time anymore to dig in this today though.
Comment #115
sunThe changes for #size look fine to me. Browsers usually size the field a bit larger than the specified size. Did you try smaller values, like 3 or 2 or 1?
Let's try a smaller #size of 2. If that still doesn't work, no biggie, let's move forward.
The situation with the Add another button appearance with regard to unlimited/limited sounds like it would be best to remove the description entirely for now, in combination with a follow-up issue to investigate WTF is actually happening there? ;)
Comment #116
swentel CreditAttribution: swentel commentedI've tried everything with that size, from 1 to 100 - no luck :)
Removed the text, I can live with a follow up or even a 'This is ok without, let's leave it like that'.
Comment #117
yched CreditAttribution: yched commentedFile widgets re-implement their own handling of "multiple widgets + add more".
Can't remember the exact reasons, maybe @quicksketch does - had to do with the "remove" button, that is specific to file / image widgets.
Comment #118
sunUnintended + bogus whitespace change.
The second additional/duplicate DIV.container-inline looks unnecessary to me?
The first one on 'cardinality_container' should be sufficient?
Can we move this #title to the select element?
Otherwise, we have an accessibility problem, since the select element does not have a label.
Doing so should also allow us to turn the wrapping #type 'item' into a regular #type 'container'.
Shouldn't this default to NULL?
Hm. Perhaps 1 is the most common case.
That said — do we actually validate somewhere that one can't assign a lower number than the highest delta in existing field data?
"Limit" might be a better (hidden) label?
Why is the validation for a limited number removed?
We still need that validation, since this is a compound/conditional validation scenario — i.e., the number field is #required, but only if the cardinality is set to limited.
Lucky you. ;)
Nevertheless, a type-strict comparison might be safer?
Comment #119
swentel CreditAttribution: swentel commentedChanges
Comment #120
swentel CreditAttribution: swentel commentedHmm actually this didn't seem to be regression, re-uploading one second.
Comment #122
swentel CreditAttribution: swentel commentedComment #123
swentel CreditAttribution: swentel commentedComment #124
xjmWhy are we silently disabling these tests?
Comment #125
xjmComment #126
swentel CreditAttribution: swentel commentedtagging
Comment #127
swentel CreditAttribution: swentel commentedRemoved the uncommented tests.
Comment #128
swentel CreditAttribution: swentel commentedRe-roll against head, can we RTBC this please ?
Comment #129
Bojhan CreditAttribution: Bojhan commentedWell, because you say please :)
Tested it and it works fine here.
Comment #130
alexpottCommitted 071dccf and pushed to 8.x. Thanks!
Comment #131
yched CreditAttribution: yched commentedThis is just reorganizing stuff in an admin form. Not sure this deserves a change notice ?
Comment #132
swentel CreditAttribution: swentel commentedI agree with yched here. This is just a simple UI change, no API change or so.
Comment #133
protools CreditAttribution: protools commentedhow about D 7 ?
Comment #135
PanchoAfter so much back and forth - this is the visual result as committed in #130:
No change notice needed, therefore removing tag.
Now, most aspects of this task are a bit feature-ish, but not being able to choose a number > 10 definitely is a WTF, so IMHO this should really be backported to D7. I'm going to take care of this.
Comment #136
Maks CreditAttribution: Maks commentedhow about D 7 ?
Comment #137
PanchoNeeds no change notification and is already in the D7 branch.
Comment #138
PanchoBefore going on holidays for a few days, I want to share with you a preliminary D7 backport, which does a number of things a bit differently, and IMHO cleaner than the current D8 solution. I unfortunately don't find the time to present the changes for now.
Certainly this would need to be applied to D8 first, and I have another D8 followup patch in the works, but I'm now just posting this, so the testbot can run over it and maybe someone wants to play with it.
Comment #139
PanchoComment #140
PanchoOkay, let's first go back to D8 for the followup.
Comment #141
swentel CreditAttribution: swentel commentedTo be fair, we've had enough follow ups in this one already, I suggest we really start from a fresh one.
Comment #142
star-szrAgreed.
Comment #143
swentel CreditAttribution: swentel commentedJust the backport, for refacotring ,see #141 and #142
Comment #144
amirtaiar CreditAttribution: amirtaiar commented#138 works for me on Drupal 7.26 also with using the plupload_field_sources.
Thank you.
Will be nice to have kind of allert when trying to add more then 20. As for now it's only upload the first 20 with no message.
Comment #145
sreynen CreditAttribution: sreynen commentedI just stumbled on this. FYI, I made a sandbox module a while ago that changes all cardinality inputs to text inputs, allowing arbitrary values:
https://www.drupal.org/sandbox/sreynen/1324292
Comment #148
lquessenberry CreditAttribution: lquessenberry commentedI used #145. Great work.
Comment #151
ydahiI've create a sandbox project here: https://www.drupal.org/sandbox/ydahi/2421885
The module allows users with the permission "Administer content types" to set the lower and upper limits for the range of values. The unlimited cardinality is still made available.
The module use hook_form_alter to globally change the cardinality instead of hacking the core cck module.
Comment #152
xjmWe keep the "needs backport" tag on permanently; otherwise we have no way of knowing which issues got committed to 8.x first. Yes it's not entirely consistent. :(
Comment #153
Anonymous (not verified) CreditAttribution: Anonymous commented6 years. Wow.
Comment #156
xjmJust noticed this is still open for backport to D7. Between then and now we changed our practices to create separate issues for D7 backports. So contributors who are interested in this feature for D7 can create that separate issue and maybe a fresh start will help. :)
Comment #160
Lanny Heidbreder CreditAttribution: Lanny Heidbreder commentedReopened #1588624 (and added it to this as a child issue, is that okay?) for the D7 backport.
Comment #161
kmstf CreditAttribution: kmstf commentedcan we use token in this field and set variable amount of fields?