Custom Fields
Support Meta Box Conditional Logic Conditional Logic broken by new Frontend Submission release

  • Creator
  • #17361
    Resolved Terran

    I just installed today's release of the Frontend Submission plugin (version 2.0.6) and that seems to have broken the Conditional Logic on the front end. Conditional Logic still works on the backend and it was working yesterday on the front with Frontend Submission version 2.0.5.

    Would it be possible to fix this?

    And in the meantime it's more important that I have conditional logic working that the delete button. Could you tell me where I can access version Frontend Submission 2.0.5?


Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
  • #17409
    Anh Tran

    Hi Terran,

    Can you send me the code of the meta box that has problem with the conditional logic? The latest update of MB Frontend Submission doesn't have anything to do with the output of fields. It's quite strange that it breaks conditional logic.


    Sure, here you go:

    As you'll see, all the conditions are set based on that first "publication_type" dropdown field.

    I just double checked by updating to Frontend Submission 2.0.6 and the conditions break, then reverting to 2.0.5 with no other changes and they come back, so that's definitely the cause. The conditions continue to work in the backend version of the metaboxes.


    This is caused by the check constant MB_FRONTEND_SUBMISSION_DIR in wp-content\plugins\meta-box-aio\vendor\meta-box\meta-box-conditional-logic\conditional-logic.php:

    if ( ! is_admin() && ! defined( 'MB_FRONTEND_SUBMISSION_DIR' ) ) {

    This constant is not used in Frond End Submission, but instead MBFS_DIR is defined.
    However, changing this would result in the conditional logic scripts to be enqueued on all front end pages regardless of the presence of a front end form.
    Wouldn't it be better to (instead of using the constant) look at the presence of conditions (just like is done for enqueueing the validation scripts)?

    Anh Tran

    Hi SIW, thanks a lot for your investigation. I'll check and fix it now.

    Update: I've fixed it in the latest version. Please update.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.