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 Multiple Pages in Edit Entry #718

Open
2 of 5 tasks
zackkatz opened this issue Jun 16, 2016 · 30 comments · May be fixed by #1664
Open
2 of 5 tasks

Support Multiple Pages in Edit Entry #718

zackkatz opened this issue Jun 16, 2016 · 30 comments · May be fixed by #1664

Comments

@zackkatz
Copy link
Member

zackkatz commented Jun 16, 2016

Currently, we don't support multiple pages in Edit Entry. We should.

  • Add a setting to enable paged edit on the "Edit Entry" settings tab (Resolved by Edit Entry: Multi-page form setting #1664)
  • When enabled, return true on the gravityview/features/paged-edit filter (or add a check for View settings in class-edit-entry-render.php around line 1142.
  • Add support for Review Page: https://www.gravityhelp.com/documentation/article/gform_review_page/ I realized this doesn't make sense, since we're saving each page of the form as it happens
  • Support Conditional Logic page breaks
  • Make sure validation is properly handled for multi-page forms

Notify:

@zackkatz
Copy link
Member Author

zackkatz commented Jun 8, 2017

@soulseekah And this is another :-)

@zackkatz zackkatz modified the milestones: 1.18, 2.1 Mar 10, 2018
@zackkatz zackkatz modified the milestones: 2.1, 2.2 Aug 21, 2018
@zackkatz zackkatz modified the milestones: 2.2, 2.3 Jan 8, 2019
@soulseekah
Copy link
Contributor

soulseekah commented Mar 14, 2019

I think this should be left for EE 2.0 (the rewrite)?

Either way, since edited form fields are very flexible, where do we add the page breaks to? How do we make them configurable? Conditional pagination is even harder.

Our current field editor is very limited. I'm trying to think hard on how to make things work in a way that would be intuitive UX wise and would make sense in the backend wise as well.

For the backend we need to know:

  1. Whether a page was added to the edit context.
  2. Which of the fields in that specific page are being added.
  3. Can we even move fields from one page to the other?
  4. Do we preserve conditional logic for pages, or do we just allow pagination unrelated to the pages in the actual form?
  5. Do we reset values for pages that become disabled due to conditional logic?
  6. Should the review page display all the edit context fields in their order?

There's a lot of fundamental discussion there about this needed here, as outlined above. We should discuss this in a lot of depth.

@zackkatz
Copy link
Member Author

@soulseekah I think we landed on only supporting multiple pages when showing the whole form. Otherwise we are recreating Gravity Forms!

@soulseekah
Copy link
Contributor

Makes sense. Should we be saving the values each and every step or only on the last submission step? Right now after some of my experiments it's saving them on every step of the way.

@zackkatz zackkatz added this to To do in Core Dev Aug 1, 2019
@soulseekah
Copy link
Contributor

@zackkatz can you respond above, please?

@zackkatz
Copy link
Member Author

Since it seems easier and I don’t have a firm opinion either way, let’s do each step for now, and then people can complain if that’s not what they want. @soulseekah

@rafaehlers @jgrisham what do you think?

@rafaehlers
Copy link
Contributor

It also seems "safer" saving it page by page.

@soulseekah
Copy link
Contributor

soulseekah commented Oct 11, 2019

Note that Gravity Forms does not save the form page by page :)

I'll implement the page by page version and then we can think about the future.

Add support for Review Page: https://www.gravityhelp.com/documentation/article/gform_review_page/

This will have to wait then, since there's no point in a review page if we're saving every step of the way.

soulseekah added a commit that referenced this issue Oct 15, 2019
Early feature.
Off by default. Set `gravityview/features/paged-edit` filter to true.

Basics on #718
@soulseekah
Copy link
Contributor

Highly experimental.

Add add_filter( 'gravityview/features/paged-edit', '__return_true' ); to activate. Make sure you don't have fields setup in the Edit configuration.

If it behaves well overall I can start writing unit tests for this.
Otherwise needs testing.

@vendojo
Copy link

vendojo commented Oct 27, 2019

@soulseekah just tried this feature and while it correctly showed the steps at the top of the form, it would finish the editing process right after clicking the 'Next' button. So right now, the 'Next' button is not loading the next page of this form but already submitting the edited entry.

Let me know if you need any further information.

@soulseekah
Copy link
Contributor

@vendojo Thank you for testing. This is a limitation, the entry fields are submitted on every single page right now. But the pages should still be advancing correctly and showing the specific page fields. Is this not what you're seeing? Can you show a video?

@vendojo
Copy link

vendojo commented Oct 27, 2019

Here's the video: https://www.loom.com/share/101bbc772e994b75842f02413b86f72f

There seems to be an issue with the form's confirmation type. I was using a redirect to another page on submission.
screenshot
As the entry is submitted on every page, it does apparently also trigger this confirmation behavior. I switched to a simple 'text' confirmation and it advanced correctly.

However, the form also advances to the next page when clicking the 'Previous' button.
screenshot
It would be better if it would actually go back one page when clicking this button, right?

@soulseekah
Copy link
Contributor

soulseekah commented Oct 28, 2019

Issues found:

  • Previous skips 2 pages when clicked, going in a loop.
  • Redirecting After Edit setting is pulled on every page.

Redirecting to another page via the Form Settings is not being triggered for me, but:

  • Check and make sure we're proactively suppressing all confirmations and notifications on our edit pages.

soulseekah added a commit that referenced this issue Oct 29, 2019
soulseekah added a commit that referenced this issue Oct 29, 2019
@soulseekah
Copy link
Contributor

@vendojo please test the latest develop.zip please?

@vendojo
Copy link

vendojo commented Oct 29, 2019

@vendojo please test the latest develop.zip please?

That's awesome, thanks mate! Works great, now, even when I have the 'Redirect to another page' setting enabled.

Just two minor things:

Ideally, the 'previous' and 'next' buttons would inherit the CSS classes and translation defined by the Gravity Forms plugin. That way you wouldn't have to translate/style them twice:
screenshot-bwe6id myraidbox de-2019 10 29-10_20_10

There appears a 'Entry updated' notification now. Don't know if this was built in intentionally or if it's a side effect. I just noticed it in the new develop version.
screenshot-bwe6id myraidbox de-2019 10 29-10_17_11

@soulseekah
Copy link
Contributor

@vendojo you should target the CSS correctly.

Regarding the update message it was there but with a link. It's without a link now. You can filter the message by hooking into the new 'gravityview/edit_entry/page/success` filter.

@vendojo
Copy link

vendojo commented Nov 3, 2019

@soulseekah fair enough. Seems to be working fine. When will this feature be available in the stable version?

@soulseekah
Copy link
Contributor

By the end of November, we hope. We need more testing before rolling it out.

@zackkatz
Copy link
Member Author

@soulseekah

  • Validation works
  • I think we should make it clear this won't work with Review Page because we're saving at each page

"Support Conditional Logic page breaks" still isn't working.

Here's a two-page form with "page conditional logic" https://i.gravityview.co/NaxtkU

  • Create an entry where the checkbox is checked and number filled out
  • Edit that entry in a View
  • Uncheck the box, click next page
  • What happens: It still shows the next page, with the number value cleared
  • What should happen: It does not show the next page; it shows the last page of the form with "Entry Updated" message

@soulseekah
Copy link
Contributor

On a related note, the " Enable Next Button Conditional Logic " feature will very very probably not work either. I'll test after I manage to fix the conditional logic page breaks.

@soulseekah
Copy link
Contributor

Haven't been able to get the Next Button Logic to work yet, but Conditional hide/shows of pages has been implemented and briefly tested. Please try it out whoever is interested.

@zackkatz
Copy link
Member Author

@soulseekah Can you share details on what the blocker is for the Next Button Conditional Logic functionality?

It'd be nice to have full feature parity.

@soulseekah
Copy link
Contributor

Next Button Logic involves pretty complicated logic code that I wasn't able to call correctly. The next option would be to rewrite the thing (this is pure JavaScript). On the other hand it's such a non-critical feature that it wouldn't be missed, I'm sure. Can we wait for someone to ask for it?

@rafaehlers
Copy link
Contributor

@soulseekah
Copy link
Contributor

soulseekah commented Jan 11, 2020

@rafaehlers

https://secure.helpscout.net/conversation/1045476411/24343

Initial support landed in 2.5.1 but not documented.

It can be turned on using add_filter( 'gravityview/features/paged-edit', '__return_true' ); for testing by customers who are willing to do so.

@bennemann
Copy link

@ghost ghost removed their assignment Oct 21, 2020
@rafaehlers rafaehlers removed their assignment Oct 21, 2020
@bennemann
Copy link

@zackkatz zackkatz linked a pull request Feb 19, 2022 that will close this issue
@bennemann
Copy link

@bennemann
Copy link

@rafaehlers
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Core Dev
  
To do
Development

Successfully merging a pull request may close this issue.

5 participants