rwmb_frontend_submit_button

Support MB Frontend Submission rwmb_frontend_submit_button

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36514
    Ole PoetterOle Poetter
    Participant

    Hi,
    I don't get it.
    Cen you give me please an example of the usage of the filter rwmb_frontend_submit_button.

    I wan't to replace the defalt class with a custom class (or add my custom class.

    Kind regards,
    Ole

    #36524
    Long NguyenLong Nguyen
    Moderator

    Hi Ole,

    Here is an example to customize the frontend submit button

    add_filter( 'rwmb_frontend_submit_button', function( $submit_button, $post_id) {
        $edit = 'true'; // or false, read the edit attribute here https://docs.metabox.io/extensions/mb-frontend-submission/#shortcode-attributes
        $submit_button = '<button class="rwmb-button my-class" data-edit="' . $edit . '" name="rwmb_submit" value="1">Submit button text</button>';
        return $submit_button;
    }, 20, 2 );
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.