Multipage form navigation - wrong joomla template

marcderix 25 Oct, 2011
Hi,

I'm building a 5 step multipage form. I turned on steps navigation and added a back button in the form code like this:

<input value="Back to previous step" name="back" type="button" onClick="window.location='http://your.site/index.php?option=com_chronocontact&chronoformname=mother_form&cfformstep=1'"/>



I created an menu-item for the mother form, and assigned a custom template to that menu-item. When I entered my data in step 1, proceeded to step 2, and then pressed the "Back to previous step" button, it would go back to step 1. But then something strange happened: it would use the site's default template, rather than the custom template I assigned to the menu-item earlier, to display step 1 of the form.

I fixed it by adding the following to the previous button link:

<input value="Back to previous step" name="back" type="button" onClick="window.location='http://your.site/index.php?option=com_chronocontact&chronoformname=mother_form&cfformstep=1&template=mytemplate'"/>



Now, step 1 will display in the right template.

I thought I should share it with you, because I searched hours for an solution.

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