Save and Continue *Now*

I would be great if the Save and Continue add-on had the option of creating a save and continue link in the background each time the next page button was clicked. The form would just continue on to the next page, but if for some reason the connection was lost, an admin could access the link via Partial Entries and send it to the person who was filling out the form so that they could continue to fill out the form rather than starting over.

On long, multi-page forms this would alleviate the risk of something going wrong along the way.

3 Likes

Hi @cjbuilt - I’m a GF user like yourself, and PHP dev.

I had a similar requirement to solve, for saving all the user’s input on multi-page forms (even when they entered some of the sub-form and clicked “Previous” instead of next).

The user had to see all their progress saved, and re-populated when they returned. In fact, their input had to be used in some of the forward pages, and all of the saved data is used by the final form to render a PDF as the final product (using HTML fields and merge tags to insert their data in placeholders).

Then finally, if they came back months later, to make on change in one form and re-create the final PDF with their update.

I wrote free-plugin for this, and I’m looking for some beta testers before I publish it on WP site.

For more info, demos, documentation please see:

https://wp.www-net.com

The “release candidate rc-4” is on GitHub, I’m adding one more needed feature right now and will proceed with release 1.0 soon after.

Cheers,
-JAS

1 Like

Hi @JASCoder

I’m testing your plugin with success right now - it’s pretty awesome.

But how do I reset the form? Normally you can reload the page, but since it’s sticky you can’t. So if I actually DO want to reset the form - how do I do that?

Hi @Joker

Very happy to receive your positive feedback, and I’ve some good news, and better news :slight_smile:

The rc4 version does support a “clear all MFSFS saved data” option, albeit in a bit of an incomplete form. I am currently working on rc5 version to add a new field type to provide more flexibility for the implementor - specific targeting of one or more groups for clearing.

I did not document the method available in rc4 because I’m intending to deprecate it asap in favor of the new field.

This works now in rc4:

  1. Create a new form - I’ll call it CAD (clear all data)
  2. Add Checkboxes field with Admin Field Label: special_mfsfs_clear_form
  3. Config one Choices (make “show values” checked so you can define the value)
  4. Config Label / Value to “Clear ALL forms” / “all” (without the quotes)
  5. In Form Settings enable MFSFS (group name doesn’t matter)
  6. In settings “Form Button” set type/text Text / “Clear Saved Data”
  7. Also I used cond. logic here to: Show if “special_mfsfs
” “is” “Clear ALL forms” so the button will only show if they’ve checked the “Clear ALL forms” box.

This CAD form can be placed on the same page as other forms, or on its own special page. In my own test page I had notifications off, and confirmations to “Text” and “all cleared” for message. So the page returns with the other form, and the message rendered where the clear field had been.

I will prolly have rc5 dev-complete and posted in a few weeks, and will drop you a DM from here, once it’s up.

LMK if you have any problems, and/or make any discoveries !

Cheers and good luck :slight_smile:

Thanks for the info. The clearing in rc4 is
 Convoluted at best. But I found your clear function, so I patched your code and put it in as a request parameter instead
 So, a vote from here to put it as a parameter (such as ?mfsfsclear=group_ or similar) so that you can link to the cleared form.

This inside mfsfs_load_fields after setting userid did the trick :slight_smile:

if ($_GET[“mfsfsclear”] != ‘’) {
mfsfs_clear_all_meta($LOC_UserId, $LOC_debug, $form[$_GET[‘mfsfsclear’]], $flds[$fldLst[MFSFS_SPECIAL_CLEAR_DATA]]); // (pass the field object)
}

Quick and dirty
 :stuck_out_tongue:

Looking forward to rc5. :slight_smile:

2 Likes

@JASCoder,

Ran across one minor issue with your framework - if the value is changed in a gform_save_field_value hook, your saved values doesn’t reflect this from what i can see. Seems like its because you hook into the validation which occurs before the save - when the save is called you don’t see the value is different.

HI @Joker !

I believe the MFSFS-saving actions occur in the validation hook due to how GF manages the multi-page form, which make it possible to provide the “sticky” persistence of entry values for when the user abandons their session prior to the final submission event.

If you are looking to modify the entries array prior to MFSFS saving the data, could you use the validate hook at a higher priority ? (else any entry value changes would need to update the saved values in the user’s meta or session)

HI again - after some reflection on your discovery, it occurred to me that if we added an additional call to the MFSFS’s “save” function in the hook for form submission, it would capture any changes made in the save_field_value hook.

LMK if this interests you, and if you’d help test out this proposed code change.

Cheers

Sure, as soon as you release rc5 I’ll test it. For now it doesn’t bug me - I’m just overriding it manually in the save we have implemented (which was easier than using the validation and rewriting).

The reason we have everything on the save is that we’re using the partial forms addon, so it does a save for every page.

1 Like

Hi again @Joker

I’m please to LYK I’ve just updated the GitHub repo with RC5 - and this includes a new “Demo4” which demonstrates the new SF_Clear custom field and its capabilities.

Feel free to send me a DM and we can connect via conventional email for future discussions.

Cheers,
-JAS