Custom Fields
Re-Envisioned
Support MB Frontend Submission Including post fields inside MB Tabs

This topic contains 2 replies, has 2 voices, and was last updated by  Anh Tran 3 months ago.

  • Creator
    Topic
  • #15427
    Resolved
    pza
    Participant

    I searched around the forum, but could not find any such request:

    • Is it possible to include the post fields (Title, Post content, Thumbnail) inside a tab?

    Or do I need to 1) hide post fields on the form 2) make dummy fields and 3) update the post fields (from the dummy fields) upon submission?

    Just asking in case this has been covered somewhere. Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #15428

    pza
    Participant

    I tried adding the “tab” attribute to the post fields, but that doesn’t seem to work:

    add_filter( 'rwmb_frontend_post_title', function( $field ) {
        $field['type'] = 'text';
        $field['name'] = 'Name';
        $field['size'] = 60;
        $field['tab'] = 'basic';
        return $field;
    } );

    I’ll have to resort to setting up dummy post meta to update post fields. But please let me know if there’s a better way. Thanks!

    #15450

    Anh Tran
    Keymaster

    Hi pza,

    Unfortunately, the post fields are displayed outside of the meta box wrapper div. It’s not possible to move the fields into the tab unless using JavaScript. But that’s kind of a hack and various depends on your meta box config.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.