Support

Account

Home Forums Bug Reports Required field on collapsed WP Metabox not validating

Helping

Required field on collapsed WP Metabox not validating

  • Scenario: I have created a required field inside a WP Metabox. I go to the new post screen, refuse to fill in any information, collapse the mentioned metabox, click to publish the post.

    What happens: post publishes without validating the required field. User is able to publish without filling in information.

    What should happen: post should fail to publish. User should have the usual warning of required field.

    If the metabox is not collapsed, field validates and post cannot be published. If I collapse it, it publishes no problem. Collapsing the metabox makes the validation vanish.

    Have any of you guys encountered this?

  • How are you collapsing the field group, is this the normal way by clicking the title area of the field group? or are you hiding the fields using conditional logic?

    If it is the first, I’m not seeing this. Try deactivating other plugins and see if you can narrow down what might be causing it.

    If it is the second, ACF does not validate fields that are hidden by conditional logic. Also, fields that are hidden by conditional logic are not submitted or updated.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Required field on collapsed WP Metabox not validating’ is closed to new replies.