Closed (won't fix)
Project:
Content Construction Kit (CCK)
Version:
6.x-3.x-dev
Component:
Usability
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Dec 2008 at 00:31 UTC
Updated:
4 Aug 2010 at 21:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
drewish commentedthat functionality is provide by cck... that said this is probably a duplicate of an existing issue in that queue.
Comment #2
OneTwoTait commentedOh ya? I don't see it... so how would you select the beginning number of values to use?
Comment #3
yched commentedtaite11 : currently not possible. What drewish means is that it is a request for CCK, who manages widgets display, not for imagefield.
Sort of related to #320313: CCK multiple values: two empty fields showing up - make it one or none? - which is on my list of things to review / tackle. Karen and I both have little time right now, plus our focus is shifting to Fields in D7 core, so this list doesn't move too fast right now...
The "don't show 10 widgets straight on if number of values is 10" part is a separate request, though. Currenlty the 'add more' button is only used for 'unlimited' multiple fields.
Comment #4
skizzo commentedI would second the OP request. In my use case I must impose a limit on the number of images entered by user: that currently would result in 40 items being displayed, even to users that need to enter just one or two... As I understand it, this feature request is being handled separately from #320313. Otherwise please mark it as duplicate. Thank you.
Comment #5
pribeh commentedbump, uber-bump, super-quantum-bump! This is exactly what my patients have requested. Can anybody help? as the maintainers appear to have their hands full. I'm just a limey themer.
Comment #6
ioskevich commentedI did it the dirty way on theme level overriding theme_content_multiple_values function.
This is not right way to do it, I guess, but at least it works and doesn't require CCK or Fielfield module code modification:
So, first we need to override standard theme function:
Copy the function code (theme_content_multiple_values($element)) from CCK's content.module to your module or theme (template.php) and rename it to: phptemplate_content_multiple_values(&$element) (I guess THEME_NAME_content_multiple_values(&$element) will also work, but I needed it at module's level).
After these lines:
add something like:
This worked for me, and was quick and cheap solution.
Comment #7
dboulet commentedI'd like to see this feature worked into the module, should this go in to 3.x first?
In my opinion, this would be huge improvement to the user interface. For example, if I want a user to upload a maximum of 20 images using Imagefield, I don't want to present them with 20 image input fields... that's a little insane :).
Comment #8
tomsm commentedIndeed, this feature is very welcome!
Comment #9
Bilmar commented+1 subscribing
Comment #10
dboulet commentedHere's a first patch for CCK 3. Please review and provide feedback.
Comment #11
dboulet commentedImproved patch.
Comment #12
Bilmar commentedvery cool! patching went smoothly and I tested with cck field type 'Text' 'File' and 'Date'.
This patch doesn't seem to affect Widget Type 'Select List' or 'Check boxes/Radio buttons'. Checkboxes/Radios I understand there is no need, but for Select List it would be very cool if we would be able to select one item from the Select List and have the option to 'Add another item' (as per the limit set) and select another item from the Select List. Would this be a possibility?
For the type 'File' I tested with imagefield crop and widget type 'image with cropping'. This looks very cool with the option to upload additional images and each with its own crop preview. The 'Remove this item' and 'Restore this item' worked very smoothly too.
In my use case, this new feature is awesome as I wanted to limit images to 5 but not show all 5 upload fields at once. This allows users to click for additional images to upload..looks very professional.
Thanks for the great work dboulet!
Please let me know if further information is needed with testing.
Comment #13
rburgundy commented+1 for 'add more' with Select List choices
thanks for the great patch. tested and looks awesome
Comment #14
skizzo commentedWill this patch be committed to CCK3 after testing?
Will it be backported to CCK2?
I just moved from 6.x-2.6 to 6.x-3.x-dev in order to use this
feature, but the patch doesn't seem to apply cleanly
patching file content.module
patching file includes/content.node_form.inc
Hunk #6 FAILED at 363.
1 out of 8 hunks FAILED -- saving rejects to file includes/content.node_form.inc.rej
Comment #15
dboulet commentedRerolled against latest dev.
Comment #16
YK85 commentedsubscribing - tested patch @ #15 and it works.
thanks for actively updating this patch to the newest dev
Comment #17
YK85 commentedAny chance of seeing this added to the newest dev release?
Great work dboulet!
Comment #18
Bilmar commentedtested the patch at #15 and everything works without any issues. great new feature!
can the maintainers of cck let us know if this may be considered to be added to the latest dev version?
thank you!
Comment #19
robby.smith commentedHi,
This patch is a very cool feature to the non-unlimited fields.
Some additional cool features would be if we were able to change the messages:
"You may enter a maximum of 4 values for this field."
"Maximum reached. You must remove values to be able to add more."
For example, if the field is for uploading images it would be nice to say:
"You may upload a maximum of 4 pictures."
"Maximum reached. You must remove pictures to be able to add more."
Additionally, hiding [Add another item] button once the maximum is reached would be nice.
Thanks so much for the hard work!
Comment #20
bcn commentedMarked #530828: Provide "Add more values" button for fields (and multigroups) with fixed number of multiple values (which itself has a few duplicates) as duplicate of this issue.
edit:Upon closer inspection, these are different issues.
Comment #21
karens commentedThis is too complicated a change to commit this late in the cycle. It has the potential to break other things and no one has time to babysit it to be sure it doesn't. Plus everything will be different in Drupal 7 anyway.
Comment #22
mark. commented.
Comment #23
interestingaftermath commentedThis patch adds "Add more values" to groups with a limited number of entries. Is there any way to take this in a different direction and start by showing more than 10 (e.g. 20-25) and then allow the user to use the "Add more values" to extend that 25 to whatever they wanted?
I know this is a slightly different topic so I've created a new issue: http://drupal.org/node/841914
Comment #24
agileware commentedThe patch created for #841914: Provide options to set how many fields are initially displayed and how many are added on click of "add more" would allow for this functionality.
If you are interested, test and review that patch, although the result could potentially be the same as this issue's won't fix status.
Comment #25
Junro commentedPatch at #841914: Provide options to set how many fields are initially displayed and how many are added on click of "add more" works really great.
Comment #26
agileware commented@junro maybe post that comment over on the queue for #841914: Provide options to set how many fields are initially displayed and how many are added on click of "add more" instead of here :)