I apreciate if someone can help
on a multipage form when I obtain model record (from CC or read-db-action) I have tested that only variables defined on the forms are passed among them
[attachment=0]Captura.JPG[/attachment]
my question is, if I receive one record with 10 fields that I will edit on 2 or three pages of multipage form
can I maintain this 10 fields on the form scope
[attachment=1]Captura1.JPG[/attachment]
I have tested with session-data and multipage action, only workaround worked for me was db-save-action and db-read-action on each page
Hi Teldrive,
This is a bit complicated and depends on how you want the form to work!
The multi page action has an option to reset the data at the first page.
I image that you may do the following:
First page: DB Read then Multi page action with "reset" setting disabled.
next pages: only multi page action, since the data is already stored in your session now and will be overwritten by any updates you make.
Last page: add a debugger to check your data
If the user goes to first page again, then all his changes will be reset and the record will be reloaded.
You may add a hidden field to every page and check it in the first page using an event switcher, if it exists then don't load the "db read", because this is an edited data record.
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max, thanks by reply
all you comment works, the issue that I'm trying to solve is how maintain fields that i read from table on first page. For example my table has 40 fields, I edit them in multipage form to manage it easy as posible. I have tested, only are passed to second page fields that are declared on page 1.
in order to solve it I have to define all 40 fields on page 1 and define again all 40 fields on page2?
I understand, but if the "db read" is before the "multi page" in page 1, and the "multi page" doesn't have the "reset" setting enabled then the data of all fields should be passed to next pages, did you try this ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max
I did a simpler form for this testing
[attachment=0]captura0.JPG[/attachment]
with only submit buttons all fields are passed beteween pages , so it works fine
but when i define two fields on page 1 paper[id] and paper[nombre] to populate them
[attachment=1]Captura1.JPG[/attachment]
only these are passed to page 2
[attachment=2]Captura3.JPG[/attachment]
let me know if I am missing something
I found that the data merging is not done recursively, this means that multi dimensional arrays are overwritten, like in this case, this will need a fix, so please send me a message using the "contact us" page to get a patch file!
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Works perfect,😀
Thanks Max