Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Save For Later

More
1 month 11 hours ago - 1 month 11 hours ago #10034 by LittleCloud
Save For Later was created by LittleCloud
Hi Visforms Team / Happy New Year!

Is it possible to implement a solution to temporarily save the form data on the client side (browser) and recall it when the user returns to the form? I imagine this would typically involve local storage or cookies in JavaScript. Can this be done at the form level (Frontend Webassets) or is a plugin required for such a functionality?

I was thinking something around these lines:


Code:
document.addEventListener("DOMContentLoaded", function () { // Check if there's stored form data and populate the form fields const storedFormData = localStorage.getItem("tempFormData"); if (storedFormData) { const formData = JSON.parse(storedFormData); Object.keys(formData).forEach(key => { const field = document.getElementById(key); if (field) { field.value = formData[key]; } }); } // Save form data to local storage when the form is submitted $("#yourForm").submit(function (event) { const formData = {}; $(this).serializeArray().forEach(field => { formData[field.name] = field.value; }); localStorage.setItem("tempFormData", JSON.stringify(formData)); // You can remove the stored data after successful form submission if needed // localStorage.removeItem("tempFormData"); }); });



PS: Most of my users consult the form during the day and may fill it out here and there. But the majority of the form completion happens at night. I would like for the data to be there waiting for them when they return to the form.

Nelson
Last edit: 1 month 11 hours ago by LittleCloud.
The following user(s) said Thank You: ykinanah

More
4 weeks 2 days ago - 4 weeks 2 days ago #10035 by Administrator IV
Replied by Administrator IV on topic Save For Later
Hello LittleCloud,

Before I go into details of an implementation of your idea, here's a note.
Visforms is already prepared for exactly this scenario and has a corresponding feature with many options.

Take a look at the following in the documentation:
- Menu item of type: Visforms » Form Data with Edit Link
- Menu item of type: Visforms » My Transfers
docs.joomla-4.visforms.vi-solutions.de/e...ront/function-range/

The time period between edit operations is unlimited.
The editing process can be accompanied by emails to administrators.
You can also let the user decide whether to send an email when saving.
If you need a different or additional 'Done' signal, you can solve it using a checkbox.

This should actually more than meet your requirements.

Kind regards, Ingmar

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
Last edit: 4 weeks 2 days ago by Administrator IV.

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum