Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

Add Repeatable Meta Fields #13

Open
kferran opened this issue Jul 8, 2013 · 15 comments
Open

Add Repeatable Meta Fields #13

kferran opened this issue Jul 8, 2013 · 15 comments

Comments

@kferran
Copy link

kferran commented Jul 8, 2013

Would love the ability to have a repeatable meta box

@tnguyen14
Copy link

+1

@vjandrei
Copy link

vjandrei commented Sep 2, 2013

+2

@owldesign
Copy link

+3

@JensRavens
Copy link

+4

@tnguyen14
Copy link

So here's a thought I have about how this could be implemented:

Introducing a new type repeater, which can be declared like so:

$meta->add_meta_box( array(
    'id' => 'staff_details',
    'fields' => array(
        'name' => array( 'type' => 'text' ),
        'repeat' => array( 
            'type' => 'repeater' ,
            'subfields' => array(
                'profile_image' => array(
                    'type' => 'media'
                )
            )
        )
    )
)

The repeater field will have a subfields argument that can take in an array of fields just like the current implementation.

The problem with this is the many level of nested array could be confusing and prone to errors. It is also worth thinking about whether we should only allow 1 level of subfields.

@N-Molham
Copy link

thanks, it is really helpful

@sixlive
Copy link

sixlive commented Nov 24, 2013

I'll be needing something like this shortly. I can try and put something together over the next two weeks. I like @tnguyen14 's thoughts. Are there more opinions on how to implement this?

@sixlive
Copy link

sixlive commented Nov 24, 2013

Maybe like this for individual repeating field(s)

$tests->add_meta_box( array(
    'id' => 'test-box',
    'context' => 'normal',
    'fields' => array(
        'test-field-one' => array('type'=>'text', 'repeat' => true)
    )
) );

And like this for repeatable box(es)

$tests->add_meta_box( array(
    'id' => 'test-box',
    'context' => 'normal',
    'fields' => array(
        'test-field-one' => array('type'=>'text')
    ),
    'repeat' => true
) );

@mattie02
Copy link

+5

@tnguyen14
Copy link

Is this feature still on the horizon?

@g-kanoufi
Copy link

I do have to ask if this feature will be added anytime soon, that would be the bomb.
Please let us know, thank you.

@sixlive
Copy link

sixlive commented Oct 16, 2014

I have a working prototype that I've used in several production sites. It only handles single level repeating groups and the ui needs to be refined. I'm going to get in touch with @mboynes.

@hilja
Copy link

hilja commented Dec 12, 2014

@sixlive Care to share?

@tnguyen14
Copy link

Is this project still active? Last update to it was back in July.

@strarsis
Copy link

strarsis commented May 24, 2017

+1
It seems that when a project starts supporting loop/repeater/nested fields it is abandoned. 😿

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests