Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REQ Repeater Field #123

Closed
bluehiveinteractive opened this issue May 26, 2013 · 16 comments
Closed

REQ Repeater Field #123

bluehiveinteractive opened this issue May 26, 2013 · 16 comments

Comments

@bluehiveinteractive
Copy link

I'm looking to see if anyone has attempted to integrate a repeater field into the framework. Basically I'm looking for something like this:

I create a new repeater field called: Social Media
Within the repeater field is a sub-set of fields like the following:
Social Media Icon (this would be an upload/image field)
Social Media Profile URL (this would be a standard text field)

Then there would be a simple "+" plus button to add another social media account to the site. If I wanted to have facebook, twitter and pinterest I would plus in 3 repeated fields. Each containing the field for the icon upload and the text field for the profile url.

I've been using Advanced Custom Fields ( http://www.advancedcustomfields.com/ ) repeater fields add-on ( http://www.advancedcustomfields.com/add-ons/repeater-field/ ) for this very reason for client sites, but for commercial theme releases I cannot embed ACF into it and will need to use the Redux Framework.

I appreciate your input/thoughts on this.

@burbridgeconsulting
Copy link

This is a great idea. Elliot Condon's implementation in ACF is beautiful and could be used as a model.

His DB implementation is very simple. If you create a field called Address, he creates a field meta_key of address. If you made address into a repeater field, with an actual field (able to give a specific value to) of type, then in the DB, the first value would have a meta_key of address_type_0. The next one, address_type_1, and so on.

This method seems a little bit breakable in a way, but that is how he does it. (I.e., why not prefix it all with 'acf_'.).

I'm not saying I would be able to find the time to help with this, but I am interested in the idea of helping ;-)

@bluehiveinteractive
Copy link
Author

I am really not adept enough to take this on myself. But I am glad I'm not the only one who sees the value in this. If there is anyone here is has the chops to take this addition on, much gratitude would come your way :-)

@towfiqi
Copy link

towfiqi commented Sep 5, 2013

👍 you guys should look into SMOF's sllider repeater field:
https://github.com/syamilmj/Options-Framework/blob/master/admin/classes/class.options_machine.php

@dovy
Copy link
Collaborator

dovy commented Sep 7, 2013

@towfiqi @bluehiveinteractive @burbridgeconsulting

Would you want to just mimic SMOF? Or how is ACF's? Can I please get a URL to ACF?

We're willing to implement anything that makes sense.

If we're talking about making it more dynamic maybe there's a way I could make it so fields could be linked. I don't know though...

@ghost
Copy link

ghost commented Sep 8, 2013

@dovy
Copy link
Collaborator

dovy commented Sep 8, 2013

Umm, wow. Just wow. Fantastic stuff. Going to have to look at this codebase a bit. ;)

@towfiqi
Copy link

towfiqi commented Sep 8, 2013

Admin Page Class(My Options Panel) also has a repeater function. You could also take a look at it:
https://github.com/bainternet/Admin-Page-Class/blob/master/admin-page-class/admin-page-class.php

I wish I had extensive knowledge on php. I tried looking into it myself, but couldn't figure out how to implement this to Redux. :/

@dovy
Copy link
Collaborator

dovy commented Sep 8, 2013

I know how to make a repeater class, but I'd love to let you embed any field Redux had inside a repeater. Just thinking of how to make that happen. Hah.

@dovy
Copy link
Collaborator

dovy commented Sep 8, 2013

Umm, well that was a crap-load easier than I thought it would be... Haha. It looks like I can do it. Man, I love this codebase.

Forthcoming, I can make a repeater class where you can set any number of fields within it. Pretty cool eigh?

@towfiqi
Copy link

towfiqi commented Sep 8, 2013

lovely!!!! :) let us know when we can expect the new version with the repeater functionality. Thanks!

@dovy
Copy link
Collaborator

dovy commented Sep 8, 2013

Maybe not as easy as I thought. I can get it to display, but I have to do some work in the validator. Hmm. Not sure this will make 3.0. Maybe 3.1...

@towfiqi
Copy link

towfiqi commented Sep 8, 2013

Great! Keep up the good work! :)

@bluehiveinteractive
Copy link
Author

Great! I appreciate you looking into this. Its way over my head. Thanks
again.

Chad Warren
Bluehive Interactive
p. 412-467-6716
e. chad@bluehiveinteractive.com
w. http://www.bluehiveinteractive.com

On Sun, Sep 8, 2013 at 1:39 AM, Towfiq I. notifications@github.com wrote:

Great! Keep up the good work! :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/123#issuecomment-24015495
.

@dovy
Copy link
Collaborator

dovy commented Sep 9, 2013

This will require a complete change of how IDs and Names are set. Not horrible, but will take some time. Added as a feature request on the new repo.

@web-caos
Copy link

Edit:
Didn't read well :)
Anyway isn't hard to do, the problem would be more for display it than for store informations...

@rustanacexd
Copy link

any update on this?

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

No branches or pull requests

6 participants