form->data

Pkoll 06 Jul, 2025

Hi Max,

I have a multi page form to use for users to register for a course. What I have tried every time when I try to use it form for the second time all the information is kept in the form.

What is the best solution to avoid that.

Please help me whit this problem. I have tried a end-page, a php at the start of the form with " unset ($form->data), redericht with attribuuts like 'field='

Nothing really helps.

Greetinga

Paul

Max_admin 06 Jul, 2025

Hi Paul

Do you have cache enabled on your website ? if yes then please try to disable it, does it solve the issue ?

After that you may enable it again, but go to the Joomla page cache plugin and add the form page URL to the excluded urls list, does this solve the issue ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
skittle 07 Jul, 2025

Hi Max,

I am also experiencing the same problem. In my case this is happening on a development site which never has Joomla caching enabled. (Edit: I also installed the new plugin and it did not help with this issue.)

I have a CF8 form that lists rows of records from a table. Each row has a button which sends the record id of the selected row to another CF8 form used to edit the selected record. This second form is designed to let the user edit the selected record. After logging into the development site I can successsfully select any record from the list by clicking the associated button. The edit form has a read_data action that looks for the appropriate record using the submitted record id and then populates the fields on the edit form with the appropriate data. It works perfectly.

However, once I return to the list and select another record, the edit screen opens but continues to show the fields populated with the data from the first record selected. The only way to select another record is to logout of Joomla completely and login back in.

The Debug window always shows the Data section with the data from the first record submitted during the Joomla session. The Data array seems to persist for the duration of the session. The Vars and Info sections of the Debug window show the results of the read_data action as an array and the actual query running correctly and returning the expected data for any row selected - it changes as different rows are selected. The Data array will never change.

Thanks,

John

skittle 07 Jul, 2025
1 Likes

In my case I was able to solve this by removing the Data Merge behavior from the initial read_data action on my form. Everything now works as expected. (Edit: Forgot to add that I used the Default Value behavior on each field in my form to get the appropriate values from the read_data action.)

John

Max_admin 09 Jul, 2025

Hi John

Thank you for sharing your solution!

This is correct, the Merge Data will not set the data key value if it already exists, this explains why the first record values persist.

I have added a new setting for the next update to change this behavior:

form->data image 1

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.