Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author mrwweb

    (@mrwweb)

    Hi @eagle41.

    Thanks for the feature request. This is something I hope to add eventually to the plugin though I don’t have timeline. If you feel comfortable working on it, the plugin is on GitHub.

    Thread Starter eagle41

    (@eagle41)

    Hey @mrwweb, Happy Holidays and thanks for the quick reply!
    With my limited knowledge, I doubt I could pull that type of functionality off. If you could find the time I would happily pay you your rate for this added functionality, and if not, again thank you so much for this plugin!

    Plugin Author mrwweb

    (@mrwweb)

    @eagle41, that is a great offer and one I’d love to take you up on. Please contact me directly (email or the form) and we can start discussing how to make this happen.

    Plugin Author mrwweb

    (@mrwweb)

    @eagle41 There is now a beta version of the plugin with this feature. If you have a chance to play with it and give me feedback in the next week or two, that would be great.

    @mrwweb Really glad to see you had time to work on this. I just tried it out with the brand new ACF 5 and nothing appears or shows up at all, not even the collapse all button.

    I went ahead and tried it on another site with 4.3.8 and the collapse all button shows up, but there is nothing for individual rows? I even did a search through the source code looking for your buton class and nothing is there.

    Any thoughts? If we can get it working in 4.3.8 I have no problem downgrading from ACF 5.0 to that to be able to use this.

    Plugin Author mrwweb

    (@mrwweb)

    @61pixels, sad to say I started this just before the v5 announcement so it’s untested there. However, I’m surprised that it’s not working on 4.3.8.

    I just pushed a new version of the beta that fixes a couple bugs (adding new rows and weird collapse all behaviour) so grab that first.

    In the following order, can you try the following and report back:

    1. Make sure you have the plugin activated! (I get burned on this about once a month…)
    2. Make sure you’re running v1.3.0-beta2.
    3. Check the console for errors.

    I’ll get to work on v5 compat soon, but want to get it working well in v4 first.

    @mrwweb no worries at all about 5.0 support, after all it’s not even officially released to the public yet. I’ll get on testing the new version in a few minutes and report back.

    Edit:
    No console errors at all. Deleted old version, downloaded new, same issues on site (local demo 4.3.8). Tried it on another local site, worked instantly. Went back to first site and thought maybe a caching issue, did a hard refresh CTRL + F5 and boom, now showing up.

    For a basic repeater it seems to work perfectly! I will do some more testing with complex Flexible fields and the like and report back, but I’m extremely excited about this! Will look forward to the update for ACF 5.0

    Been playing with this, and gotta say it’s work well done. However, I’d like to point out 2 issues. 1, when you collapse rows via the individual collapser, and then click expand all, the text in the individual expander buttons still reads “expand row”.

    In addition, this plugin doesn’t take into consideration content loaded via ajax calls. In this situation, the buttons completely fail to even render. It’d be really swell if you’d wrap the binding and populating functions, so that they could be reinitialized on the fly.

    Plugin Author mrwweb

    (@mrwweb)

    @lagdonkey thanks for testing!

    Those both sound like issues I resolved th beta2 version. Can you double-check you have the most recent beta from Github?

    If that doesn’t fix it I’ll dive in to see what’s going wrong.

    Yup, I can confirm it’s Version: 1.3.0-beta2, the one you pushed out roughly 6 days ago. I’m going to play around a bit more, and see if I can figure it out. Will report back with what I find.

    Plugin Author mrwweb

    (@mrwweb)

    Thanks for double-checking @lagdonkey. If you figure out what’s going on, that would be great. Also, if you could send me an XML export of your form fields (see my contact page for an email) that would help with my testing.

    Well, I manged to make some headway. I wrapped your binding/listening events in a function called init, and can now call the event on the fly.

    However, because the plugins wrapped in an anonymous function, there’s no way to call it externally. At this point, I think the course of action I’m going to take, at least for myself, is to add another listener that will fire the init function when my content is reloaded via the ajax call.

    I can post the modified code on pastebin if you want.

    Okay, so I got it working the way I wanted. Here’s the modded code here. https://pastebin.com/GC8KNgmh

    As I said above, I wrapped your binding functions in a wrapper. I also added an initial call within the dom-ready wrapper, to set things up the first time. I also added my own listener, which re-fires the init. After that, I can easily fire it externally, by calling $( “.editor_wrapper” ).change(); which triggers the on-change function.

    Hit send too soon. While I added the listener to my own element, you could set it up to target one of acf’s elements.

    However, the other issue, where the button text isn’t changing still persists.

    Plugin Author mrwweb

    (@mrwweb)

    Thanks @lagdonkey.

    I’ve got the single button text issue fixed so am now on to addressing the AJAX issue. Is this something you’re seeing in the core ACF or is this more an issue in a custom plugin you have? I’d love to be able to test this on my own if possible.

    Generally speaking though, it seems wise to wrap up the init stuff in a function either way. Just hoping to get a handle on this all before pushing out the update…soon hopefully!

    In terms of the listener you added, would you suggest that it needs to be in the core plugin or just that you could then add it yourself as needed? Right now, if you run the init function multiple times, you can end up with two or three buttons on each row, so I’d need to account for that extensibility if this is a common need.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Expand Single Repeater Row’ is closed to new replies.