Add Group
Support › MB Builder › Add Group
- This topic has 9 replies, 3 voices, and was last updated 7 years ago by
Anh Tran.
-
AuthorPosts
-
January 11, 2017 at 8:07 PM #4774
hkipi
ParticipantHi,
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
gabJanuary 11, 2017 at 11:25 PM #4777Anh Tran
KeymasterJust 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 ), ), ), );
January 11, 2017 at 11:27 PM #4778Anh Tran
KeymasterOh, sorry. I didn’t notice this is for MB 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).
April 5, 2018 at 8:48 PM #9087webdev
ParticipantI'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?April 5, 2018 at 9:32 PM #9088webdev
ParticipantFurther to the above, no group-related code is output in the Code Generator...
April 6, 2018 at 2:47 PM #9098Anh Tran
KeymasterHi,
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.
April 6, 2018 at 3:30 PM #9099webdev
ParticipantHi,
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.
April 6, 2018 at 3:47 PM #9100Anh Tran
KeymasterI'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.
April 6, 2018 at 4:24 PM #9101webdev
ParticipantWow, 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?
April 7, 2018 at 12:48 PM #9106Anh Tran
KeymasterIt's the MB Builder extension. I've just updated the Meta Box AIO as well 🙂
-
AuthorPosts
- The topic ‘Add Group’ is closed to new replies.