Limiting file uploads on a given submit
I have a file field that has unlimited cardinality (and needs to). But I need to only allow one upload per submission. Does anyone know how to do this?
You can set maximum number of values users can enter for this field to be one. Go to admin >> select the field from content type >> update the number of values If you want to keep this settings as unlimited then you can use form validation function. Thanks, On Wed, Jan 14, 2015 at 9:01 AM, Nancy Wichmann <nan_wich@bellsouth.net> wrote:
I have a file field that has unlimited cardinality (and needs to). But I need to only allow one upload per submission. Does anyone know how to do this?
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Thanks Muhammed Naushad Web Developer +971529187882,+919744663973 http://stunningspider.com
They need to be able to upload another file on the next update, so setting it to one doesn't work.
________________________________ From: muhammed naushad <naushunaushad24@gmail.com>
You can set maximum number of values users can enter for this field to be one.
Go to admin >> select the field from content type >> update the number of values
If you want to keep this settings as unlimited then you can use form validation function.
This seems like a form element level validator would fix this by verifing that only a single new file is being posted. Perhaps compare to existing files added to the field, and make sure only one new file is added at a time. Lucas On Wed Jan 14 2015 at 8:06:42 AM Nancy Wichmann <nan_wich@bellsouth.net> wrote:
They need to be able to upload another file on the next update, so setting it to one doesn't work.
------------------------------ *From:* muhammed naushad <naushunaushad24@gmail.com>
You can set maximum number of values users can enter for this field to be one.
Go to admin >> select the field from content type >> update the number of values
If you want to keep this settings as unlimited then you can use form validation function.
-- [ Drupal support list | http://lists.drupal.org/ ]
participants (3)
-
Lucas Hedding -
muhammed naushad -
Nancy Wichmann