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.
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.
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?
Very happy to receive your positive feedback, and Iâve some good news, and better news
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:
Create a new form - Iâll call it CAD (clear all data)
Add Checkboxes field with Admin Field Label: special_mfsfs_clear_form
Config one Choices (make âshow valuesâ checked so you can define the value)
Config Label / Value to âClear ALL formsâ / âallâ (without the quotes)
In Form Settings enable MFSFS (group name doesnât matter)
In settings âForm Buttonâ set type/text Text / âClear Saved Dataâ
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 !
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
if ($_GET[âmfsfsclearâ] != ââ) {
mfsfs_clear_all_meta($LOC_UserId, $LOC_debug, $form[$_GET[âmfsfsclearâ]], $flds[$fldLst[MFSFS_SPECIAL_CLEAR_DATA]]); // (pass the field object)
}
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.
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.
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.
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.