Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi Thomas,
I replied you on Github. To edit existing meta boxes, please just follow this instruction.
Anh Tran
KeymasterAh, as I explained in the previous reply, the new cloned group will inherit the current state of the last clone. So if the last one is collapsed, users will get a new collapsed one.
Anh Tran
KeymasterHi Thomas,
The code generated by the Online Generator or following our documentation doesn't violate the theme review guidelines. It's safe to be used in the themes.
Anh
Anh Tran
KeymasterHi,
I tried your code and it works to me. Probably we're misunderstanding each other.
The
'default_state' => 'collapsed'makes sure when you create a new post, the group will be collapsed.When you open a group to enter data, its state will be reserved (with
'save_state' => true). When you clone a group, the previous is remained (so if the last clone is expanded, then the new clone is expanded and vice versa).Hope that makes sense.
Best regards,
AnhAnh Tran
KeymasterHi David,
The long term for MB Frontend Submission is making it works with any kind of object and any kind of data storage. Your proposal is a nice trick. I will try to implement it and see how it works ๐
Anh Tran
KeymasterI partly understand :).
The logic behind saving state for collapsible groups is quite simple that you can do similarly. Just add a hidden field to the group and use the CSS class to access to that field to set/change value. Because it's an actual field, the value will be saved when the group is saved.
Hope that helps!
Anh Tran
KeymasterHi,
Yes, it's possible.
The collapsible groups have collapsed / expanded state. You can set the default state via
'default_state' => 'collapsed'and make the group saves its state with'save_sate' => true.Anh Tran
KeymasterHi,
Please just add a setting
'clone_default' => trueto fields if you want them to have 'std' value when cloning. If you clone a group and want to keep 'std' value for sub fields, please add that setting to all sub field.Anh Tran
KeymasterHi,
No problem. We're working on this.
Anh Tran
KeymasterHi David,
Thanks a lot for your reply. I've looked at the database structure of Posts2Posts and it's quite similar to your 2nd table structure. I will try to implement this feature as soon as I can.
Thanks,
AnhAnh Tran
KeymasterHi David,
Thanks a lot for your examples. That makes the picture a lot clearer. I will read more about this (probably Posts 2 Posts is the best one in WP ecosystem, right?). In the mean time, would you mind sharing how you have implemented a solution before?
Anh Tran
KeymasterHi David,
Thanks for a great question.
Currently, the way Meta Box and extensions work are one-way relationship. You can use a field "post" to attach 1 or many posts to a post. That's similar to 1-1 and 1-many relationship, but just one way.
The MB Custom Table does the storing job only. So if you create a custom table with 2 columns ID and related_posts, you can store related posts for a single post. And you can query the related posts via helper functions.
I've been thinking about relationship, but I'm not too clear about the usage of that in the situation of WordPress. Would you mind describe what you need and let's work on a good solution?
Anh Tran
KeymasterGreat! Happy holidays ๐
Anh Tran
KeymasterHi, can you please give me more info about the "dynamic options"? And the clone ID you're talking about is the ID of inputs in the group?
Anh Tran
KeymasterI've found the bug and fixed it in version 1.2.12 of Group extension. Please update.
-
AuthorPosts