I'm creating an agenda builder, which uses Metabox, and the Groups, Tabs, and Conditional Logic extensions.
My basic setup is a set of 3 nested groups that can be cloned. It allows me to create an agenda with the following format (as an example):
Section
- Item
-- Notes
- Item
-- Notes
Section
- Item
-- Notes
Section
- Item
-- Notes
-- Notes
-- Notes
It's all working properly now except one thing I can't seem to figure out.
The entire agenda is stored as a serialized array in the database. I use another script to parse and process agendas for other features of the website.
For all of my "notes" fields I have created a hidden field called "processed". When my processing script processes an agenda it will mark the notes as "processed" by updating the value of that hidden field to "1" instead of "0".
So far, so good. I can create an agenda, run my processing script, it processes the agenda and updates the "processed" field of each processed note to "1".
But if I open the agenda now and use the "add" button to add another note, it clones the previous field including the hidden field with the value of "1". So the newly added item would be ignored by the processing script because it looks like it's already processed.
I have the "std" setting of the hidden field set to "0", and I've tried different combinations of the "clone_default" setting, but it seems no matter what I do the value of that hidden field is always "1" from the previous clone entry, instead of the default value of 0 that I'm trying to get.
Is there a way for me to set the default value of a hidden field in a nested clone group so that the default value is used when a new clone is added instead of using the value from the previous field?