Skip Navigation

[Resolved] Continue Form after leaving page (and save input)

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to enable my Users to submit a partial post using Forms, then return later and complete their submission.

Solution: You can use multiple Forms to achieve a similar effect. Use one New Post Form to create the initial post, then use multiple Edit Post Forms to complete the post. Each Form can include different input fields. You may need to use the expert mode builder to delete required fields as needed per step.

This support ticket is created 3 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 7 replies, has 2 voices.

Last updated by Christian Cox 3 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1989141

I am creating a frontend form to submit a case (case=custom post type), with a lot of fields. Will it be possible for the user to pause and save the form and continue later?
Shane answered yesterday (in chat): Hi Winy,
Unfortunately no this won\'t be possible. The form needs to be completed before they leave the page.
winyS : That\'s a pity. Will this be possible if I use a Gravity Form to submit a case?
Shane: I cannot be sure of that as that would need to be discussed with the gravity forms team as this would need to be a feature of their plugin.

I searched further and found this ticket:
https://toolset.com/forums/topic/creating-a-multi-page-form/
Which gives me hope that it can be done with Toolset.
Am I right?
It would help if I could view an example of such a form somewhere.

Thank you,
Winy

#1989557

Hello, as Shane mentioned it is not possible to save a few fields in a single incomplete Form. Without submitting the Form, those entries will not be stored anywhere and progress will be lost. On the other hand, it is possible to create an incomplete post by submitting a Form with fewer input fields. Then you could edit the same post in other Forms, showing a few different input fields in each Form, breaking up the post editing process into multiple Forms on separate pages. This could make front-end editing of Cases complex, but it is possible.

Let's assume each Case post has 30 input fields. You could place 10 of the fields in the first Form, which is configured to create new Case posts. Ideally you would capture the main critical information, like post title, in this Form. You could set that Form to create posts in "Draft" status if you don't want to publish the Case post until the User has filled out all the fields, or you could publish the post immediately in an incomplete state.

After submitting the first Form to create a new Case post, you can redirect the User to the second Form, containing the next 10 input fields. At that point, the first 10 inputs would be saved and they no longer need to be displayed on the second Form. Only changes to inputs 11-20 would be considered in this Form. The second Form should be configured to edit the existing Case post, and retain the current post status upon submission. After submitting the second Form to edit the existing Case post, fields 11-20 will be saved, along with the existing fields 1-10, for a total of 20 fields saved in the Case post. Then you could redirect to a third Form configured to edit the existing Case post, displaying fields 21-30, and set the post status to Publish when the Form is submitted. At that point, the User has had an opportunity to fill in all the fields, and it probably makes sense to publish the post.

You'll need to consider the workflow when a User abandons the site without completing all the stepped Forms. Do you want their post to be published, or kept in draft status? If they leave the site and return a few days later, they may not remember the Case post was incomplete, so you might need a way to direct the User to edit their incomplete Case post(s). When they try to edit the Case post, it might not be straighforward to determine which step they should return to. The User can skip through any completed steps quickly, since any existing field values will be shown in the edit Form.

Assuming you create the Case post initially in draft status, you might also want to decide how to handle post edits after the Case is complete. At that point if the User wants to edit the Case post using Forms, you would have to decide whether you want to show a single Edit Post Form with all the input fields, or if you want to show another stepped Form where there are just a limited number of input fields per page.

Your thoughts?

#1990515

Hello Christian,

Great suggestion, totally worth a try.
Is there a tutorial on how to set up such a stepped form?

Considering the workflow when a User abandons the site without completing, there might be an alternative:

I was inspired by your reference site hidden link

First, the user needs to create an account.

After logging in the user can add a case with the form “Add case”.

After submitting the form (complete or partial) the case will be saved as a draft.

(With Post forms access control we can give the Subscriber access to Edit Own Custom Post with the Form "Edit case”.)

If the user returns a few days later, he can login and on his account page click on the link “Edit” to complete the form. The “Edit” link will open the form “Edit case”. Any existing field values are shown in this edit Form.

Things to resolve:
* How does the moderator know if the case is ready to publish (all the fields are completed in one or more sessions)? Maybe add a checkbox for the user to confirm that he is ready to publish?
* How to make clear to the user that when he comes back after a few days to complete the case he will not use the "Add case" link but go to his account page instead and click "Edit"?

Regards,
Winy

#1990871

Great suggestion, totally worth a try. Is there a tutorial on how to set up such a stepped form?
Not really, just what you've seen in the other ticket with custom code examples. The process is generally:
- Create the custom post type, custom taxonomies, custom fields associated with this post
- Create the new and edit post Forms. When the Form is created it will automatically include all the custom fields and taxonomy inputs, so you must delete some fields from each Form as it is created to split up the input fields into separate, stepped Forms
- Place the Forms on your site using custom Pages and Content Templates as explained in the reference ticket
- Adjust and apply the custom code from the reference ticket

Considering the workflow when a User abandons the site without completing, there might be an alternative:
This approach might work well, but please note that required fields shown in a Form must be completed before the Form can be submitted. If the New Post Form or Edit Post Form includes required fields, these fields must all be completed before the User can save their progress. In a stepped approach, only those required fields shown in the current Form must be completed to submit the Form. You can see how required fields will impact the User's ability to save progress, so I think that is something you should consider in advance.

Things to resolve:
The "publish confirmation" checkbox approach you described is one option, but it will probably require custom code to programmatically adjust the post status after submission, depending on the field value. One way you might resolve both these issues without additional code is a workflow change that requires one more step for the User to submit their post for review. Set the new and edit post Forms to save the post in Draft status. Use redirection to redirect the User to their My Account page after submitting the Form, and also upon login. Then in the My Account page you can show a View of the User's draft posts in a prominent location with a header that says something like "Your Unsubmitted Draft Posts:" and a button next to each post "Submit for review". This way the User will immediately know they have posts that have not yet been submitted for review upon login and also after submitting Forms. In the list of Draft posts, you can include an edit post Form directly in each row of results, and have that Form save the post in Pending Review status. Instead of showing all the input fields in the Edit Form, you will delete all the visible inputs from this Form except the Submit button, and change the text of the submit button to say something like "Submit for Review", so the only thing the User sees is a "Submit for Review" button next to the post title/link. When the User clicks Submit For Review, the draft post status will change to Pending Review in wp-admin, and that can be the cue for the Administrator or Editor to review the post and publish it. Use redirection on this Form to reload the current My Account page, which will update the User's list of Draft posts accordingly - i.e. the Pending Review post will not appear in this list anymore. If you'd like to inform the administrator about the new submission in a more direct way, you can also use Forms' automatic email notifications feature to send an email including a link to review the post, either in wp-admin or in a front-end edit post Form that will finally publish the post.

#1990973

Thank you so much, Christian!
I'm impressed with how much is possible with Toolset. Ik will give it a try and come back to you with the results.

#1991149

Great, I'll stand by for your update.

#1998887

You may close this topic, but I definitely will report the results to you, hopefully within a few weeks, maybe months. Can I reopen the ticket later again?

#1999405

After a certain amount of time the ticket cannot be reopened, so feel free to create new tickets as needed. Thanks for the update!