Submit button div

Support MB Frontend Submission Submit button divResolved

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

    This thread was marked as complete, but the answer was not to the question I intended so I think my reply is missed.

    I was wondering how I can put the button in the HTML so that it is in same div as the current submit button. How do I edit the main html form for elements such as the default metabox submit button

    Eg: https://jam.dev/c/abee4327-17f4-4264-8251-61a66950048d

    Sure I can pull it down with CSS, but thats a messy solution. I would rather it be in same div.

    #43613
    PeterPeter
    Moderator

    Hello,

    You can try to use the filter hook rwmb_frontend_submit_button to add your custom button to the same div. For example:

    add_filter( 'rwmb_frontend_submit_button', function( $button, $config ) {
        $button .= "<div>your button here</div>";
        return $button;
    }, 10, 2 );

    Please read more in the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#form-hooks

    #43624
    YasmineYasmine
    Participant

    Thanks, that was exactly what I needed. Its perfect now.

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