Support Forum
Support › Meta Box Group › Cloneable group inheriting values from previous group
Hi there. I have set up a cloneable group with some of the options being hidden or shown depending on the values set within the group. All fine. When I come to add a new group however, the new group inherits all the values of the previous group. I can go through and overwrite them but it doesn't seem like the correct behaviour. Maybe I'm missing something? Is this a known issue?
Hey I think I'm having the same error as you, like this? see video http://grfk.co.nz/kVG2Pk
Yep that's exactly the problem I'm having.
I must say as much as I use and like the metabox plugin, it's pretty frustrating having paid for it, yet getting such limited support.
Hi,
Sorry for the late reply. I've been working on the documentation last week and couldn't fix the issue. I have replicated it on my localhost and will fix it as soon as I can.
No problem and thanks for reply. Look forward to hearing about the fix.
Same issue here. It should reset the "conditions" set and duplicate the fields rather than "cloning" them. Also, the standard "field" param 'add_button' does not work for most/all fields.
Say you have an image uploader and limit it to 1 upload, you'd want the button to say "Select an image", one would think 'add_button' => 'Select an image' should work in the field of the image uploader but it doesn't. But the "topmost" field works, so in my "group" and I have it cloneable, where this issue of this topic comes in, the button text can be changed.
Iffy behaviour thought I should put it in here while you're looking at the other issue we have.
I've just fixed issue of not clearing image_advanced value when cloning a group. Can you please try it on your site to see if it works? I'll release new version when we confirm that.
Hi Anh. That hasn't worked for me. It's still inheriting all the values from the previous group. I'm using Group in conjunction with Conditional Logic in order to show or hide fields. I don't know if that's part of the problem?
Can you please post your code here? I tried with some configurations and they worked. Probably I missed something.
Sure. Sorry there's so much, but better you have it all:
https://gist.github.com/rilwis/46fd5cdf262b9bcc7f7d9b906861796d
Hi again,
I've just tried your code and it works properly. Have you tried the latest code on Github? (not on wordpress.org cause I haven't released new version yet)
Thanks Anh. No it's still not working, even using the latest Metabox from Github. A new group is still inheriting values from a previous group. Screen recording:
As you can see when I go to add the second group it inherits what came before, although not the image_advanced values anymore.
Ah, I got it. It's a different from the media field that I've resolved. This is a problem with Conditional Logic extension that doesn't refresh after cloning. I will check and fix it.
Ok. Thanks Anh. I thought it may be something else.