Tet banner

Custom Fields
Support Meta Box Group Item number within a group

  • Creator
  • #19478
    Resolved James Pirret


    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
  • #19486
    Long Nguyen

    Hi James,

    Do you mean auto-increment value of the field number when using a cloneable group? Please describe more about the question.

    James Pirret

    Hi Long,

    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.

    Long Nguyen

    Hi James,

    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.