Form doesn't reset variables after reload page

Discover why the form session variables may not be cleared even after reaching the last form page.

lollymaster 17 Apr, 2025

Hi all,

i have a 4page form that i have to reload when i go to the end of it( eg. click on the page link of the menu).  When i reload the page, the multipage form starts  from the 1st page. then i click next and the form go directly to the 4th page like this:

Form doesn't reset variables after reload page image 1

The crazy thing is that during debug active this not happens, but the upload field shows the name of the past file uploaded.

The other thing is that wheni go the second time on upload field, i can see the name of the previous file(is not unsetted).

can someone help me?

Thanks,Lorenzo

Max_admin 18 Apr, 2025

Hi Lorenzo

I will need to test the form to understand this more, but let me explain something, Reload will load the "Load" event of the same form page, is this what you are using ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lollymaster 18 Apr, 2025

Thanks Max.

Yes i'm trying to reload the same page.

Let me recap the problem: when i go to the last page of the multipage form(the 4th) and i reload the same page of the form(also with reload page of the browser) the form starts with the correct page (the 1st) but when i press next(button next page) the form goes directly to the 4th page of the form(it seem that remember the previous use of the form).

Thanks,

Lorenzo.

Max_admin 21 Apr, 2025

Hi Lorenzo

How do you reload the page at page #4 ?

What is the behavior you are expecting when you reload page4 ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lollymaster 21 Apr, 2025

Hi Max,

After the #4 page of the form I expect that when I reload the page the form reset all variables used the time before. But now when I reload the page and I press next from the 1st page of the form, it goes directly to the 4th page 

Thanks,

Lorenzo 

lollymaster 30 May, 2025

Hi Max,

i'm coming back on this issue. 

I'm really sorry but i need to solve it, or to have a way where i can investigate.

I uploaded a video that i can share with this link: https://youtu.be/XcEijN37bYM

There you can see for eg. during the use of a wizard, i upload a file(step2). Then after the end of wizard navigation, i have pressed the link on the menu that is the same link of the form wizard(so i reloaded the page), but as you can see, variables doesn't reset (such as file_excel, next no) and on step 2 of wizard, there is stil the same name of the previous file upload.

Please give me a way to understand what happens. :D I tried everything i know. But the problem still there.

Thanks,

lorenzo.

lollymaster 05 Jun, 2025

Is there someone that can help me?

Sorry, but is really important to solve this situation for me.

Thanks a lot

Max_admin 05 Jun, 2025
Answer
1 Likes

Hi Lorenzo

The behavior you have is normal.

You did not finish the form before you clicked the menu link again, the form session is still not finished

The form session is finished ONLY after the last page has been "submitted", but you did not submit page 4, you need to change your form to 3 pages only and move the HTML about the "Nome Card" to page 3 "submit" OR keep the form as 4 pages but add one more button to page 4 to submit it 

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lollymaster 10 Jun, 2025
1 Likes

You have saved my life Max!! Thanks a lot.

see you on next post :D

Max_admin 10 Jun, 2025

😊

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lollymaster 11 Jun, 2025

Hi Max,

im sorry about the question, but i need to know if there is a way to force the form clear session also if is still not finished. As i sad, also by leaving the formpage.(i mean something that clear the session like i can use every time i open the form at step 1).

Thanks a lot.

Max_admin 12 Jun, 2025
1 Likes

Hi Lorenzo

I have added a new action to the next update to do this:

Form doesn't reset variables after reload page image 2

but for now you can use the following code inside a PHP action:

ChronoSession::clear("chronoforms8_pages_" . $row["id"]);
ChronoSession::clear("chronoforms8_data_" . $row["id"]);
ChronoSession::clear("chronoforms8_vars_" . $row["id"]);
ChronoSession::clear("chronoforms8_elements_" . $row["id"]);
ChronoSession::clear("sectoken". $row["id"]);
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.