Custom Fields
Re-Envisioned
Support Meta Box Conditional Logic Conditional Logic Not Working on Frontend

  • Creator
    Topic
  • #27446
    Resolved Qu1nt
    Participant

    The conditional logic of my form is not working in the frontend. Works fine in the post type page but shows all fields on frontend

Viewing 10 replies - 1 through 10 (of 13 total)
  • Author
    Replies
  • #27457
    Long Nguyen
    Moderator

    Hi,

    Please try to deactivate all plugins except Meta Box, MB extensions and switch to the default theme of WordPress (Twenty TwentyOne) then re-check the issue.

    Get more details on the step Debugging Information https://metabox.io/support/topic/how-to-create-a-new-topic/

    Let me know how it goes.

    #27478
    Qu1nt
    Participant

    I am using Twenty TwentyOne Theme and only have oxygen enabled with Metabox, Is oxygen causing the issue?

    #27479
    Qu1nt
    Participant

    Getting this error - uncaught referenceerror wp is not defined

    #27482
    Qu1nt
    Participant

    So I figured it out, when I remove the post_fields from the shortcode the conditional logic stops working, how do I remove title and content and keep conditional logic?

    I've tried replacing with date, revisions and others but still doesnt work.

    #27525
    Long Nguyen
    Moderator

    Hi,

    Can you please share the code that creates the custom fields, conditional logic, and the frontend shortcode? I will check it on my local site.

    #27980
    Jordan
    Participant

    Hi Long,

    I have the exact same issue. Working with Metabox AIO and Oxygen. With post_fields included in the shortcode, conditional logic works fine but as soon as I remove it (or remove "content" and leave "title") it just stops working, displaying the field all the time.

    Here's the shortcode used in Oxygen:
    [mb_frontend_form id="command-form"]

    Here's the code for the conditional logic:
    https://pastebin.com/TfabQPQu

    And the full code for the custom fields:
    https://pastebin.com/eAGrSQBh

    Thanks!

    #27981
    Long Nguyen
    Moderator

    Hi Jordan,

    Please try to use the shortcode in the Block editor or Classic editor. Let me know how it goes.

    #27996
    Jordan
    Participant

    Same problem persists without Oxygen.

    #28004
    Long Nguyen
    Moderator

    Hi Jordan,

    I do not see any issue with your code, screen record https://share.getcloudapp.com/2NuweR4z.

    Please make sure that Meta Box and Meta Box extensions are up to date. Then follow the step Debugging Information here https://metabox.io/support/topic/how-to-create-a-new-topic/.

    Let me know if it helped.

    #28008
    Jordan
    Participant

    Everything is up to date. If I deactivate Oxygen completely is does work, so there must be a conflict somewhere.

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