Forums

navigate a multi page form

zetap 07 Feb, 2018
Hello



I have created a form that contains multiple pages and everything works correctly. Now, I would like that the user, as he advances in the pages of the form, could go back to the previous one, maybe he is interested in modifying some data before sending the form. I have read the frequently asked questions and the forum, I have added a new button to each page, but I can not find a way to configure it by clicking on it to go back to the previous one.



Could you help me solve it?



Thank you very much !
GreyHead 09 Feb, 2018
Hi zetap,

The simplest way is to use a link styled as a button and set the link URL to that of the previous page.

Bob
zetap 09 Feb, 2018
Hi Bob, thanks for your response.



According to what you tell me, on the second page of the form, I included a custom code in the design of the form, adding a link, but it gives me problems, the form is called FormAltaDeMiembroMultipage, so the initial url of the form is index. php? option = com_chronoforms5 & chronoform = FormAltaDeMiembroMultipage, but if I go to that url, the information entered on the first page of the form is deleted.



What would be the link so that the information entered on the previous page is not deleted?



Thank you very much, greetings!
GreyHead 10 Feb, 2018
Hi zetap,

You need to have a MultiPage action before the HTML (render form) action in the first page of the form. That will re-load any saved data.

Bob

PS It gets a bit more complicated if this is a form that might be completed several times in the same session - in that case you need a way to clear thesaved data before re-starting.
zetap 11 Feb, 2018
Hello

I was solving it in that way, the problem is that on the first page of the form the multipage action was enabled to erase the data.

Could you explain to me a way to know if it is a return from the previous page or a new access to the form?

Thank you
GreyHead 12 Feb, 2018
Hi zetap,

I would probably add an entry to the Joomla User session after the first page is submitted and remove it after the form is finally submitted. Then you can check for that on the first page load to see if this is a new access or not.

Bob
This topic is locked and no more replies can be posted.