getting values for sub group fields in oxygen

Support MB Group getting values for sub group fields in oxygen

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #48765
    hello@twosixmedia.co.uk[email protected]
    Participant

    I have added a sub group in metabox and I can't seem to see the field names in oxygen to add the data - can you help please - the code that metabox gave me for my setup is below. I can see the first group in the repeater but not the sub group

    <?php
    $groups = rwmb_meta( 'treatment_category' );
    foreach ( $groups as $group ) {
    
        // Field text_tu3ffbt7f:
        echo $group[ 'text_tu3ffbt7f' ] ?? '';
    
        // Field treatment_lede:
        echo $group[ 'treatment_lede' ] ?? '';
    
        // Field treatment-group:
        $subgroups = $group[ 'treatment-group' ] ?? '';
        foreach ( $subgroups as $subgroup ) {
    
            // Field treatment-name:
            echo $subgroup[ 'treatment-name' ] ?? '';
    
            // Field treatment_price:
            echo $subgroup[ 'treatment_price' ] ?? '';
    
            // Field treatment-space:
            $checkbox = $subgroup[ 'treatment-space' ] ?? 0;
            if ( $checkbox ) {
                echo 'Checked';
            } else {
                echo 'Unchecked';
            }
    
        }
    }
    #48769
    PeterPeter
    Moderator

    Hello,

    Thanks for reaching out.
    In case of using Oxygen Builder, please reach out to them if you have any issues with installation, configuration, compatibility, or usage.
    Refer to our support policy https://metabox.io/support/topic/support-policy/

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