Forums

how to skip a page

Pkoll 01 Jun, 2024

Hi Max

I have a form with 3 pages. In the first page I have two buttons. The first button (submit) goes to the next page, but the other button had te skip the seconde page and had to go to the third pages. In CF7 you can redirect and link to a page but in CF8 that's not possible.

What is the solution?

Greetings Paul

Max_admin 03 Jun, 2024

You need to set the next page using the next page action when the button name is present in form data, this should be done in the "submit" event of page 1

you will need to use a PHP action with the Events behavior enabled to check if the button name is available in the data and trigger the next page action

if you need steps or screenshots then please let me know

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

Hi Max,

Thanks, for the answer and yes can you please send me an example for the Php. 

 Paul

Pkoll 12 Jun, 2024

Hi Max

Please send  me an example

Greetings

Paul

Max_admin 16 Jun, 2024
Answer

The PHP code should be something like this:

if($this->data("button_name") != ""){
return "different";
}

in your PHP action enable the Events behavior, add an event named "different", save the form to enable the new event, then drag your next page action inside that event box

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Pkoll 16 Jun, 2024

Hello Max

thanks I Will try it to night 

Paul

Pkoll 16 Jun, 2024
1 Likes

Hi Max,

It works, thanks. I didn’t known  that you van put an action in a trigger of a PhP file.   greetings Paul

You need to login to be able to post a reply.