Support › Meta Box Group › Item number within a group
I am trying to get a number value for each group, so that thee first one is 1, then 2, etc. is there a way to call this, I seem to only be able to call 1 for all of them.
Thanks in advance.
Do you mean auto-increment value of the field number when using a cloneable group? Please describe more about the question.
Sure, sorry, I'll try to be clearer. I have a cloneable group and for each group I would like to either call or assign it a number so that each group is numbered 1, 2, 3, etc.
The aim is to be able to use php queries to be able to assign alternating classes and also if needed I can identify specific numbers if required.
I hope that makes more sense.
When you get the value of the cloneable group with rwmb_meta(), it returns an array with the key is indexed from 0, so you can use this key to numbered the group. For more information, please follow the documentation