Forums

Is it possibile to have a NextPage action into an event?

Mmax2 28 Oct, 2024

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.

Max_admin 02 Nov, 2024

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

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Mmax2 02 Nov, 2024

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.

Max_admin 02 Nov, 2024

ok, it does work for me here as expected, I get the bbb page displayed (3rd page) when I run this:

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Mmax2 03 Nov, 2024

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.

Max_admin 19 Nov, 2024
Answer

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

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Mmax2 19 Nov, 2024

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.

Max_admin 19 Nov, 2024

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}

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Mmax2 21 Dec, 2024

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.

Max_admin 21 Dec, 2024

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 ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Mmax2 21 Dec, 2024
  1. 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.
  2. 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.
  3. The form setup is as follows:

Thank you.

Max_admin 21 Dec, 2024

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

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Mmax2 22 Dec, 2024

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

Max_admin 23 Dec, 2024

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

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Mmax2 23 Dec, 2024

So, what's the difference between data and var, as they all are set for the whole form session?

Max_admin 24 Dec, 2024

data array is for fields data, the var array is for the actions data

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.