How to add a simple Number field in a Metabox Block with MB Builder?

Support General How to add a simple Number field in a Metabox Block with MB Builder?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #41685
    DaveDave
    Participant

    Hi,

    I need a number field for a mb block - the user will enter between 1 and 10. I've tried text field with validation rules in Advanced Settings in MB Builder and it didn't validate.

    Now I am trying HTML 5 number field which I understand has self validation based on settings - so i entered the settings min 1 and max 10. I have 2 HTML 5 fields. Neither validate and one has a red asterisk on it no matter what input and the other has no asterisk.

    Hopefully there is an out of box solution so I don't need to add styling and validation code myself?

    Please advise

    thanks

    #41695
    PeterPeter
    Moderator

    Hello Dave,

    Can you please share some screenshots of the issue on your site? And export the field group to a JSON file then I will import it on my local site and check the issue.

    In the builder, you can use the Number field or Text field with validation to create a number field. Please follow the documentation
    https://docs.metabox.io/validation/
    https://docs.metabox.io/extensions/meta-box-builder/#export--import

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