Validation not working

Support General Validation not working

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43725
    YasmineYasmine
    Participant

    Hi, I promise this is the last issue from me - I am so close to having finished.

    Last problem though is my validation no longer works. I have added a filter to turn the meta box default button into a save button, and then at the end of my form added another submit button:

             [
                    'id'   => $prefix . 'form_submit_button',
                    'type' => 'submit',
                    'std'    => __( 'Done', 'your-text-domain' ),
                    'columns'    => 12,
                    'save_field' => false,
                    'tab'  => 'page_22',
                    'attributes' => [
                        'class' => 'form-submit rwmb-button rwmb-form-submit',
                    ]
                ],

    However, when it is clicked, it shows the alert that not validated yet continues to process and save post. How do I make my button behave like the default meta box button? Is there a configuration I am missing. Couldn't find anything in the docs.

    This is my shortcode: [mb_frontend_form id="academic-research-summary" ajax="true" post_type="research" confirmation="Saved"]

    #43738
    PeterPeter
    Moderator

    Hello Yasmine,

    Do you use the validation of Meta Box as in the documentation? I don't see that in your code.
    https://docs.metabox.io/validation/

    Also, supporting a customization code (second button) for your specific needs is beyond our scope. You can submit a customization request via the contact form below, our development team will help you with an extra fee.
    https://metabox.io/contact/

    #43819
    YasmineYasmine
    Participant

    Hi,

    Yes I have 'required' => true, across many fields.

    Understand you do not support a second button, but it is just a submit button and when it submits the validation does not work. I don't think there is anything in my button that is causing this

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