Custom Fields
Support General Way to re-use field groups?

  • Creator
  • #31261


    I am wondering if there is a way with this plugin or add-ons to define a group of fields and re-use them in another settings box?

    I am building out a settings page that will have multiple meta boxes placed in various locations on it. Some of these boxes will have the exact same settings. I cannot use a repeater field because the order of content needs to be in a certain order.

    Is it possible to define a group of fields and re-use them in multiple places like this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
  • #31268
    Long Nguyen


    With the Builder, you can assign a field group (meta box) to more settings pages to re-use the field group. Like this

    Using code:

    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    function your_prefix_function_name( $meta_boxes ) {
        $meta_boxes[] = [
            'title'          => __( 'Field Settings page', 'your-text-domain' ),
            'id'             => 'field-settings-page',
            'settings_pages' => ['my-custom-settings', 'my-settings-2'],
            'fields'         => [
        return $meta_boxes;

    Please read more on the documentation



    I assume that means though I can't assign it to multiple places on the same settings page?

    For instance, our settings page is to choose modules to be in specific places on the homepage and those modules are the same settings that are re-usable in the specific places they can go. It looks like I can't do that currently.

    Long Nguyen


    The field ID (meta key) is associated with the post/page ID or option name (setting page) so it's not possible to use the same field ID in other places on a page.

    You can try to use the cloneable feature to duplicate a field or a group.

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