I was able to setup a star rating field using your tutorial here: https://docs.metabox.io/tutorials/add-star-rating-fields/
I was then able to add the star rating field type to the Meta Box Builder using your documentation here: https://docs.metabox.io/extensions/meta-box-builder/#extending-the-builder
add_filter( 'mbb_field_types', function ( $field_types ) {
// Add star rating field type to Meta-Box Builder
$field_types['star_rating'] = [
'title' => __( 'Star Rating', 'blogcraftco-theme' ),
'category' => 'advanced',
'controls' => [
'name', 'id', 'type', 'label_description', 'desc',
'clone', 'sort_clone', 'clone_default', 'clone_as_multiple', 'max_clone', 'add_button',
'before', 'after', 'class', 'save_field', 'sanitize_callback', 'attributes', 'custom_settings',
],
];
return $field_types;
} );
The star rating field works as expected when inserting it into any newly created field group.
The one thing that I cannot seem to find is how to have the star rating be automatically set to a default value (i.e., 5) whenever the field group is initially loaded.
Where/how would I do that for custom field types that have been added to the Meta Box Builder?
Best Regards,
Ryan