Dear Tran,
We found an error using Metabox 4.17.1 where we are on version 4.15.7 and using the form without any hassle but when updated to latest (4.17.1) version seen error while updating custom post having file field which was giving required error, while it was showing the uploaded file. Can you please help us in resolving this error ASAP so that security patches/fixes released by you can be applied, we are currently using 4.15.7 version.
Thanks & Regards,
Calpaq
Hi Tran,
Thank you for prompt reply & providing patch. The patch resolved problem but it nullified our dynamic script that marks the required fields dynamically (sine fields needed to mark it only in front end form). I had actually set them required if not admin using the hook rwmb_frontend_after_submit_button. Can you please give me such setting that will only work for front end or backend specifically so that I can use your patch as well and fulfill out requirement.
Thanks & Regards,
Calpaq
Because of the dynamic of the field, my patch works as follows:
Do not set required for the input, instead set data-required="1".
When users add or remove a file, run a JS callback to check if there's no uploaded files, then set the required field for the first input (we only need to set for the first one as it's okay to have at least one input not empty if there are many inputs).
I have no idea how your dynamic script works, maybe you get the the idea of how it works here and might change your script a little bit.
Hi Tran,
Again same issue after latest update error while updating custom post having file field is giving required error, while it was showing the uploaded file.
Can you please provide us the solution.
Thanks & Regards,
Calpaq