how to skip a page

How to skip a page in a multi-page ChronoForms form.

Overview

The issue occurs because CF8 does not have a direct redirect feature like CF7 to bypass a page.
Use a PHP action with Events behavior to check for a specific button click and trigger a custom event that contains a next page action to jump to the desired page.

Answered
ChronoForms v8
Pk 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 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.
Pk Pkoll 03 Jun, 2024

Hi Max,

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

 Paul

Pk Pkoll 12 Jun, 2024

Hi Max

Please send  me an example

Greetings

Paul

Max_admin 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.
Pk Pkoll 16 Jun, 2024

Hello Max

thanks I Will try it to night 

Paul

Pk 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

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