Custom Fields
Re-Envisioned
Support General Seems error in meta box plugin

This topic contains 4 replies, has 2 voices, and was last updated by  Anh Tran 2 weeks, 2 days ago.

  • Creator
    Topic
  • #14007

    calpaq
    Participant

    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #14008

    Anh Tran
    Keymaster

    Hi Calpaq, thanks for your feedback, let me check it.

    #14019

    Anh Tran
    Keymaster

    I’ve fixed the bug here, can you please help me to test it? Thanks.

    #14023

    calpaq
    Participant

    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

    #14026

    Anh Tran
    Keymaster

    Hi,

    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.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.