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

Support Gravity Forms Repeater Add-On on the Edit Entry page #761

Closed
rafaehlers opened this issue Sep 12, 2016 · 7 comments
Closed

Support Gravity Forms Repeater Add-On on the Edit Entry page #761

rafaehlers opened this issue Sep 12, 2016 · 7 comments

Comments

@rafaehlers
Copy link
Contributor

rafaehlers commented Sep 12, 2016

https://docs.gravityforms.com/repeater-fields/

The error message on the Edit Entry page:
Uncaught SyntaxError: Unexpected token a in JSON at position 0

the returned JSON:

a:2:{i:1;a:1:{i:6;a:1:{i:0;s:21:"http://gravityview.co";}}i:2;a:1:{i:6;a:1:{i:0;s:28:"https://demo.gravityview.co/";}}}

Related:

@zackkatz
Copy link
Member

Should be addressed with a GravityView_Plugin_and_Theme_Hooks sub-class.

@pinksharpii
Copy link

What is the status of this? I don't see a GravityView_Plugin_and_Theme_Hooks subclass created for this plugin. I too am having this issue. A little more explanation on how the class needs to be setup and what the function needs to do to prevent this error would be helpful.

@soulseekah
Copy link
Contributor

soulseekah commented Jan 31, 2017

The Repeater Add-On has been abandoned and is currently not being maintained. It currently has over 30 submitted issues on GitHub.

Here are some related issues I could find:

This is definitely a bug on the plugin side and not an incompatibility with GravityView. GravityView uses the Gravity Forms APIs to render the edit form and the Repeater Add-On simply doesn't work with Gravity Forms at this point.

So, ideally, this has to be fixed upstream. Putting a flaky hack together in the form of a "compatibility" layer is probably pointless, if possible at all.

@soulseekah
Copy link
Contributor

A quick update after some time with the add-on - there's absolutely no functionality that hints at editing in there. The closest thing that it does support is the prePopulate setting when rendering, but that would conflict with the actual pre-populate setting when creating these fields. And even then, the prePopulate field doesn't support added instances of a repeat, there's no code to create them.

Overall, I'm sure we could override the whole rendering routines and write all the editing logic in GravityView for this plugin (including stubbing out the shipped JavaScript logic, because it contains nothing that supports editing either), but that sounds like a step in a very wrong direction and will take a couple of days of full-time work. Work that should actually be done on the upstream repository (i.e. the Repeater Add-On code). Even better, work that should be done on Gravity Forms to provide core repeating functionality 😄

Any thoughts, ideas are always appreciated, so keep them coming 👍

@zackkatz
Copy link
Member

Yeah, Gravity Forms is working on this for core. Not sure when it will be released, but I don't think we should support the Repeater addon. Instead we will support core functionality.

@pinksharpii
Copy link

That makes sense. I didn't realize how problematic it was. It's about time it becomes a core feature! I've found a sort of workaround for now, hooking into gravityview/edit-entry/render/before

@floatytheastronaut
Copy link

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

No branches or pull requests

5 participants