This Wix Code/Database update seems like a great alternative to the 123 Form Builder system and I have a couple questions about features that may or may not exist in the Wix Code/Database system.
-
On 123 Form Builder, there is a feature where an e-mail is sent to specified e-mail addresses once a form is completed. This notification usually includes a copy of the submission in PDF format. Is there any way, when using these custom forms, to make sure that certain e-mail addresses are notified (preferably including the completed form) upon completion?
-
Another feature on 123 Form Builder is the ability to activate a “Save for Later” button that enables people working on the form to fill in part of a form and return to it later. With the custom forms, is there such a feature that will allow people to complete part of a form and return to it later with all their previous entered data preserved?
Thank you for your help!
Giri: Re 2) above how do i implement this on my form?
i.e. add a button that allows them to return to semi-completed form at a later date.
Sam, I would do it like this: I would put 2 buttons on the form, let´s say “Save and Submit” and “Save for Later”. In my Collection, I would define a boolean called “Submitted”, defaulting to false.
After a button click (onClick) on any of the 2 butons, I would do a .save() of the dataset. Then on the .onBeforeSave of the dataset, I would check which button is clicked and if it was “Save and Submit”, set the boolean to true before we save and do the rest of the work.
To check which button, you could define a var with global scope (=outside any function) called strWhichButton, which you clear on declaration.
In both onClick´s of the buttons, I would set either strWhichButton = “SaveAndSubmit” or =“SaveForLater”.
In the onBeforeSave you can now check the value.
If you allow your clients to leave only 1 form to be left for later, you can do a query on the dataset for the boolean===!(true) (so a empty/null boolean is also found) and display the form.
If you allow more than 1 form, then you do the same query, show all unsubmitted forms in a grid and let the user pick one, before showing the form to edit.
Hopes this helps.