Require at least 1 field to be filled out to submit post

Support MB Frontend Submission Require at least 1 field to be filled out to submit post

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #40056
    shmaltzshmaltz
    Participant

    I have a form with 3 fields in it, and the user has to fill out at least one of them.

    It can be any of the 3 fields.

    Is it possible to verify this with JavaScript before submitting?

    (I would like to show them an error message).

    #40062
    PeterPeter
    Moderator

    Hello,

    The JS validation only helps you to validate one field itself. If you want to validate that at least one field has value, please try to use the form validation with PHP code. Read more on the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#validation

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