Support Meta Box Group Getting label value of sub-field Reply To: Getting label value of sub-field

#11934
Anh TranAnh Tran
Keymaster

It's great that you found a solution. I think the rwmb_get_field_settings() function can help a little. It gives you the group field settings and then you can get the options for sub-field.

$group = rwmb_get_field_settings( 'group' );
$sub_field = $group['fields'][0];
$group_value = rwmb_meta( 'group' );
$sub_field_value = $group_value[0]['sub_field'];

$label = $sub_field['options'][$sub_field_value];