Support Forum
Support › Meta Box Builder › Add Group
Hi,
Just add Group type field, but it provide field name and id fields.
How can I define the subfield or clone group of fields?
Thanks
gab
Just think "group" is a special field. The only difference is it has fields
parameters, which is an array of fields. This is a sample code:
$meta_box = array(
’title’ => ’Test’,
'fields' => array(
// Group
array(
'id' => 'group_id',
’type’= > 'group',
// Subfields
'fields' => array(
array(
'id' => ’text',
’type’ => ’text’,
’name’ => ’Text’,
),
// Other subfields go here
),
),
),
);
Oh, sorry. I didn’t notice this is for Meta Box Builder.
To add subfields to a group in the Builder, just drag fields to be a child item of the group item (think like you drag and drop the sub menu in the Appearance > Menus).
I've been trying to do this as you mention above, but it doesn't seem to work.
In the Group Builder field, all that appears is the General tab, and dragging fields over it, under it, to the right, etc, as you might do with a standard WP menu... none of it works.
Seems like it's broken?
Further to the above, no group-related code is output in the Code Generator...
Hi,
I've made a video to demonstrate how to create child fields for groups with the Builder extension:
Please take a look. After doing that, the code will be available in the Code export tab.
Update: I've just updated the plugin, making a drop-zone for sub-fields of groups, so you can drag and drop sub-fields easier.
Hi,
You're right... It does work, but it's very temperamental. I had to try for about 30 seconds before I found the sweet spot and it actually accepted the child element.
It's much less obvious that it's been connected up properly than the standard WP menus, but it does work.
Perhaps it could be improved when you have time, but definitely not a priority 🙂
Thanks.
I've just updated the plugin, making a drop-zone for sub-fields of groups, so you can drag and drop sub-fields easier (and make things obvious).
Please update the plugin.
Wow, that was fast 🙂
I don't see any new versions yet, but maybe it'll take a while to show? Should I be looking for a new Metabox, Metabox AIO, or Metabox Groups?
It's the Meta Box Builder extension. I've just updated the Meta Box AIO as well 🙂