Multi page form as plugin

szabob 13 Jul, 2019
Hi All,

I have a 2 page form inserted into the end on an article. First page is shown below the article, which is good.
When I click on submit the second page displays also below the article. What I want to achieve is that the second page will show the form only without the article. I think, this was the normal behavior of CF5 but now in CF6 the article is shown above each page. Or am I missing something ?

Anny suggestions are appreciated.

Cheers

Bob
healyhatman 13 Jul, 2019
Turn off AJAX, if it's turned on
szabob 13 Jul, 2019
thanks healyhatman, I don't use ajax
szabob 15 Jul, 2019
Is there a way to set the target of the Submit button ?
healyhatman 15 Jul, 2019
You don't set the target of a submit button, you set the target of the form. If you need to manually set it you'll need to use a "form area" in Display and set your form to "Custom" instead of "Form" in the main settings
szabob 15 Jul, 2019
Ok, this seems to be too complicated to me. I wish to find a simple solution for this. I managed to do some observations. When I open the article with the form the address bar shows this:

index.php?option=com_content&view=article&id=4&Itemid=137


When I click on the submit button it will change to this:

index.php?option=com_content&view=article&id=4&Itemid=137&chronoform=form1&event=two


If i change the address bar manually to this:

index.php?option=com_chronoforms6&chronoform=form1&event=two


then I will get the result what I need. So is there a way to do this automatically ?

cheers

Bob
healyhatman 15 Jul, 2019
No, if you want it to display the first page in an article but the second page on its own, you need to put the form target in manually. It's not complicated.
szabob 15 Jul, 2019
And how can I set the form target ?
healyhatman 15 Jul, 2019
Drag a form area to the view, put everything inside it. In the settings there will be "Action URL" where you set it and you'll want it to be yoursite.com/index.php?option=com_chronoforms6&chronoform=youform&event=page2

In the main settings page for the form set app type to custom.
szabob 15 Jul, 2019
The main problem with the custom form is that when I change it to custom all the formatting on the fields are gone. As if the css would not load. No idea why..
healyhatman 15 Jul, 2019
Because you need to use a form area and put everything inside it. It's why I specifically mentioned it.
szabob 15 Jul, 2019
:D You're right. Let me try this...
szabob 15 Jul, 2019
now, i put the stuff in a form area. It displays the first page but when i submit it it does not go to the second page but redirects to submit immediately 😶
healyhatman 15 Jul, 2019
Well what did you put in for your action URL?
szabob 15 Jul, 2019
Oh, I figured it out: other than setting the action url yo need to remove 'submit' from the submit event.
szabob 15 Jul, 2019
I made some progress and now the form works except one thing: if i go back to page 1 from page 2 the data will get lost. How can I keep the form data in the session ? At the form setting page the Multi Page is set to on but does not seem to have any effect. Is it something that I have to do with the Data Provider field of the form area ?
Max_admin 16 Jul, 2019
Try to use
{session:form-alias}
in the "Data provider" of the form area.
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
szabob 17 Jul, 2019
Hi Max,

I figured it out! I just had to put the multi page action in each page. Strange, because it is not necessary when the form is nut custom.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger