This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 4
[urgent] Reset button, to reset form for customers.
Started 10 years ago by MvdL79 | 3 posts |
-
Hi Yuniar (and other staff),
How do we add a form reset button for customers. For example; I am now testdriving a form, however it remembers everything. If I now open the page with the form I am currently using it remembers what I have filled in so far.
This is especially annoying since I am testing our forms, but I think it will also be "annoying" for customers when they will use the form, because if they decide to order something else, they have to unselect stuff.
Or can you give me a piece of code so a button (with image) is added, so customers can reset the form completely?
Posted 10 years ago # -
MachForm uses standard PHP session to keep track the information when your customers fill a multipage form. By default, the session will expire after certain period of time already (after 30 minutes or 1 hour, depends on the PHP setting on your server) or when your customers restarted their browser.
I suggest not to change this behavior as this is quite the standard.
If you are testing it, I suggest to use the browser incognito mode each time you would like to do some test. This way, your session won't get tracked.However, if you really want it, here is a PHP code that could reset the session:
<?php session_start(); $_SESSION = array(); session_regenerate_id(); ?>
Put that code into a PHP file and then create a link within your form to that page.
That should reset the session.MachForm Founder
Posted 10 years ago # -
Uhmz... Completely makes sense what you said.
Will leave it as it is and *when* it gives problems, I will add the button.Thanks for responding Yuniar. :)
Posted 10 years ago #
Reply
You must log in to post.