Tagged: ,

This topic contains 2 replies, has 2 voices, and was last updated by  friendlyfire3 2 years, 7 months ago.

  • Author
  • #7802


    Hi, I searched the demos and forums but couldn’t quite find what I’m looking for.

    I want to repeat a meta box with an “add more”

    Say I have a meta box called “Event” that has name, date, description as piklist fields.

    Then I want to allow the user to repeat this meta box with an “add more” and create a new event with the same fields.

    I know this is possible with ACF but I’m trying to stick to piklist. Is this possible? And if so, how?

  • #7806


    I’ve only started playing with it so there may be other ways, but you can create a grouped field and repeat that, which is much the same as the way ACF does things

    piklist('field', array(
        'type' 			=> 'group'
        ,'label' 			=> 'Event'
        ,'add_more' 		=> true
        ,'fields' 			=> array(
    	  // add the fields that describe an event
                 'type' 			=> 'text'
                 ,'field' 			=> 'event_name'
                 ,'label' 			=> 'Event Name'
             // ... etc - more fields
  • #7807


    Thanks. However, I don’t want to repeat fields. I want to repeat an entire metabox.

You must be logged in to reply to this topic.