Good evening, I'm trying to set the following submit:
All variables are correct, but the NextPage is not performed even if the event triggered is "indietro" and the php34 variable is set with the alias of the page (I saw it in debug).
If I delete all and leave only php34 and next_page33, the behavior is correct and the NextPage is performed.
Try to set the "Next page" setting to Auto, does that make it work ?
I know this is not the logical solution but for now this is how the next page action works
The "Next page" setting has always been set up to "Auto", because if I set it to "Manual" the Next page action doesn't work.
In fact I've always wondered what was the purpose of "Auto" and "Manual".
Beyond this, my problem is how to get the "Next page" action working inside an event.
Thank you.
ok, it does work for me here as expected, I get the bbb page displayed (3rd page) when I run this:
Your example works, but I can't get my example to work, so I prepare a super-easy form with 2 pages to demonstrate my problem. In page 2 if you hit the "Back" button, you don't get back to page 1.
Test Multipage 2
i tested this on v8.0.27, the form goes from page 1 to page 2, if i click send it will show the message, but back does not work, you need to use a button link for that
Thank you for your reply, but this is indeed my problem: I can't simply use a button link.
Suppose you have a multipage form. Based on a choice in page1 (for example, a checkbox marked or not), you can go to page2 or to page3. The last page is page4 for all. So the possible paths are: 1-2-4 or 1-3-4. When you are in page4, you can't go back to the right page if you use a link button, because you have to run a condition to know which page to go. That's why I need to nest a NextPage action into php code.
set a variable when you do the first next page, for example var:selected_page, then on page 4 you can have a button of type Link (not previous page link), and set the chronopage parameter in the url to the {var:selected_page}
Sorry but I can't make it to work.
If I set the button link like this:
it works as expected, but if I set like this:
it doesn't work and go to the first page. But if I see in the debug, i see this:
selected_page is page2, chronopage is page2, but I go to the first page.
Where am I wrong?
Thank you.
does the chronopage=page2 appear in the browser address bar after you click the button link ?
A direct link to skip a page will NOT work, in this case you have a direct link, you can only do this through the Next Page action in the submit event
How do you have the form setup ?
- If in the "URL Parameters" I write "chronopage=page2", the "chronopage=page2" appears in the browser address. If I write "chronopage={var:selected_page}", the "chronopage=page2" doesn't appear.
- I only try to implement your suggestion, as you said "you need to use a button link for that", and then "set the chronopage parameter in the url to the {var:selected_page}". But in your last post you say "A direct link to skip a page will NOT work", so I don't know what to do anymore. I already tried with the Next Page action, but it doesn't work, as I demonstrate in my post on 03 Nov, 2024.
- The form setup is as follows:
Thank you.
ok, how did you set the "selected_page" parameter ? this is in the Data array, so to get its value you should use {data:selected_page}
please try that and let me know
You are right, it is working now.
In Chronoforms 7 I saw this post, where you said about the 3 types of variables (variables, request data and session data).
Now in Chronoforms 8 there are Data, Variable and Session, I can imagine that:
- Data are set for the whole form session, until form is submitted
- Variable are set on the same form page
- Session are set for the whole user session
And their use is as follows:
- {data: data_var_name}
- {var: var_name}
- {session: session_var_name}
Plase confirm that what I wrote is correct, thank you.
Massimo
correct, but there is no space after the ":", it should be {data:field}
And, in v8 the variables are also set for the whole form session
So, what's the difference between data and var, as they all are set for the whole form session?
data array is for fields data, the var array is for the actions data