- This topic has 8 replies, 5 voices, and was last updated 2 years, 7 months ago by
Alex Kladov.
-
AuthorPosts
-
-
April 23, 2015 at 10:36 am #3647
jcristMemberBeing able to select multiple images is great but sometimes we need to limit the file field to only 1 images/upload. I know that we can use
,'validate' => array( array( 'type' => 'limit', 'options' => array( 'min' => 1, 'max' => 1 ) ) )however this seems a bit cumbersome — if the user has a file selected and click the Add Media button, another file is added. Then when saving, they receive an error that there should only be 1 file selected.
I see that in version 0.9.5n there was an enhancement for setting ‘multiple’ => false, however this doesn’t seem to work as (I) expected. While is does limit the number of files you’re able to select in the media upload lightbox, you’re still able to select multiple files by adding a file then clicking Add Media again. Ideally I’d like to replace the file if 1 has already been selected. Is the only option right now to create a custom field type?
-
April 28, 2015 at 11:38 am #3653
-
May 19, 2015 at 7:22 pm #3720
mcmasterMemberThanks for the explanation, Steve. This one’s on my wishlist, too.
-
June 22, 2015 at 5:02 am #3901
anagramMember+1
but still i’m happy to see that there’s a workaround (could be improved though)
-
December 6, 2015 at 11:41 am #5241
jcristMemberSorry to bump an old thread but is still on the todo list? 9.9 is amazing btw
-
December 7, 2015 at 12:39 pm #5253
-
December 8, 2015 at 10:10 am #5260
jcristMemberThanks Steve, it does work well though my question is more geared toward not allowing the multiple files at all, exactly like WordPress’ Featured Image field.
I know that it would take some re-working of the file field but I thought I would ask having to create a new field for this 🙂
-
December 8, 2015 at 12:00 pm #5264
SteveKeymaster@jcrist– We plan on adding this feature in now that we have the server-side validation working. Right now we’re working on the next version of Piklist. Unfortunately, feature requests are going to have to wait a bit.
-
June 26, 2019 at 11:34 pm #9424
Alex KladovParticipant@Steve Sorry to bump an old thread, didn’t want to create one, since this discussion already exists.
Is this still in the works 4 years later? Or is there a single file select feature already available (i.e. like WordPress Featured Image field), but just not documented?
I am not talking about back-end validation, I already use that one and it works great. Just would be a nice from UI/usability perspective to disallow multi-file selection on the front-end as well, as to not confuse the users with unnecessary errors.
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.