Custom Fields
Support MB Frontend Submission Submit Button gets disabled after submit when errors are still there

  • Creator
  • #14466

    Dear Tran,
    I came across with the problem that was freezing the form when I submit the form. Detailed description about this is as follows.
    1) I have filled up the form clicked submit button
    2) Form has still errors so the cursor focused to first error field
    3) cleared errors in the form by filling up valid data & tried to submit but button was disabled & there is no road to go ahead.
    I figured out a solution to that is
    a) Found that script in this plugin is disabling submit button for saving from multiple submits.
    b) I have fixed this script using following modification of the script

    setTimeout( function() {
                    $this.children( '.rwmb-form-submit' ).children( 'button' ).prop( 'disabled', true );
                }, 0 ); 

    changed to

    setTimeout( function() {
                        if ($this.valid()) {
                            $this.children( '.rwmb-form-submit' ).children( 'button' ).prop( 'disabled', true );
                        }  else {
                            $this.children( '.rwmb-form-submit' ).children( 'button' ).prop( 'disabled', false);
     }, 0 ); 

    Please guide me that the path is correct?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #14470
    Anh Tran

    Hi Calpaq,

    Thanks a lot for your feedback. I’ve just realized the problem yesterday. Your solution seems right. I’ll test it and release a new version.

    Ryan Lauritsen

    I can confirm we’ve had the same issue. Calpaq’s fix seems to work. Thank you!

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


Subscribe to our newsletter to receive news and tutorials for Meta Box and WordPress.

grid gear info copy caret-up caret-down trash