-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Dropzone "Max Files" dynamically #83
Comments
In the DA execute a Javascript Code action: $('.dropzone')[0].dropzone.options.maxFiles = $v("P1_DROPZONE_FILE_COUNT"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
APEX OCI, 20.2
In my project I want to limit the user to uploading 6 images per product. On the page I have 3 hidden fields:
P1_DROPZONE_NO_IMAGES
select count(*) from my_table where id = :P1_ID
P1_DROPZONE_MAX_IMAGES
static =
6
P1_DROPZONE_FILE_COUNT
= :P1_DROPZONE_MAX_IMAGES - :P1_DROPZONE_NO_IMAGES
The DROPZONE attributes
max Files: &P1_DROPZONE_FILE_COUNT.
When I refresh the page and i have 4 images stored in db my values are :
P1_DROPZONE_NO_IMAGES = 4
P1_DROPZONE_MAX_IMAGES = 6
P1_DROPZONE_FILE_COUNT = 2
And i cannot load any more than 2 images using Dropzone. However when i upload one image my values are now:
P1_DROPZONE_NO_IMAGES = 5
P1_DROPZONE_MAX_IMAGES = 6
P1_DROPZONE_FILE_COUNT = 1
But I can still then add a further 2. The value of P1_DROPZONE_FILE_COUNT is 1 but the Max Files in Dropzone is still 2. I have tried refreshing the DropZone region.
How can I make sure Dropzone MaxFiles is updated correctly please?
Thanks
The text was updated successfully, but these errors were encountered: