Custom Fields
Re-Envisioned
Support MB Frontend Submission Creating Complex User Forms Reply To: Creating Complex User Forms

#12355

Anh Tran
Keymaster

Hi Neil,

#1. I’m afraid there’s no pagination supported at the moment. But I think you can use the Meta Box Tabs to organize the fields into tabs, so not many fields are displayed to users at once.

#2. Yes, that’s doable. Firstly, you need to create an archive page for your packages. It’s like a custom post type archive in WordPress, so no big deal.

Secondly, create a “Edit” page, where you insert the shortcode [mb_frontend_form] to edit a package.

Finally, add a link to the “Edit” page in packages. To make the “Edit” page understands the package, you can pass the post_id to its URL. So, I’d like to use a filter to auto insert the link to package’s post content, like this:

add_filter( 'the_content', function( $content ) {
    if ( ! is_singular( 'package' ) ) {
        return $content;
    }
    $edit_page = 123; // ID to "Edit" page
    $edit_page_link = get_permalink( $edit_page );
    $edit_link = add_query_arg( 'rwmb_frontend_field_post_id', get_the_ID(), $edit_page_link );
    $content .= "<p><a href='$edit_link'>Edit package</a></p>";
} );