Custom Fields
Re-Envisioned
Support General Displaying Nested Fields Using Beaver Themer

  • Creator
    Topic
  • #20944
    Resolved @mindspark
    Participant

    If my custom fields are nested like this ->

    Group - Year 1
    Text Field - $100

    The Beaver Themer integration only displays a value of 'array'

    Is there a plan to enable the display of nested fields using Beaver Themer?

    If not, can you please help show me how to add either use my own shortcode for this or how to set up using PHP statements in the template I created?

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #20948
    Long Nguyen
    Moderator

    Hi,

    You can create a shortcode then add to the Beaver Themer to show the field value in a group field.

    Here is my sample code

    function group_field() {
        $group_field = rwmb_meta( 'group_field' );
        return $group_field['text_field'];
    }
    add_shortcode( 'group_field', 'group_field' );

    and screen record to demo https://www.loom.com/share/717feea1c46d41838e01d90f42a05818

    Follow the documentation to get the sub-field value
    https://docs.metabox.io/extensions/meta-box-group/#getting-sub-field-value
    and create the shortcode
    https://codex.wordpress.org/Shortcode_API

    #28162
    @mindspark
    Participant

    Sorry for this late reply - thanks for the explanation. I'll experiment with this a little and report back to you.

    I think your example may not be a perfect solution, because in this case all data input is done by the user via the backend, so in my application, we are not using Blocks and our sub-fields are a financial table where the user is entering about 15 records.

    I'll come back after more consideration.

    thanks!

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