Forums

Create Return and Next buttons

EX34Mush 24 Jan, 2017
I see there has been a lot of discussion on this in the past but much relates to pre CFv5 versions.

Following FAQ advice I set up a pair of Submit buttons using Multi Field. I then created an Event Switcher that is intended to work as follows:

With the user on Page 2 of the form Click the 'Next' button and the event switcher selects the event for Page 3. Click 'Back' and it selects the Event for Page 1. (buttons are Named 'back_p1 and next_p3)

I use the following code in the Event Switcher:
    <?php
    if(!empty($form->data["back_p1"])){
      return "PageOne";
    } else if(!empty($form->data["next_p3"])){
      return "PageThree";
    }
    ?>

It works fine from Page 2 to 3, but when I go from 2 to 1 I get no output from ChronoForms..

Am I falling into a well known trap here?

Any ideas Bob!
GreyHead 24 Jan, 2017
Hi EX34Mush,

What do you have in the PageOne event of the Event Switcher?

What URL do you see when you "get no output from ChronoForms."?

Bob
EX34Mush 24 Jan, 2017
1 Likes
That was quick!
Sorry to be wasting your time, but I realised after I posted that I was using a non-existent event name for Page One. Just corrected it and all is now working properly.
Thanks again,
This topic is locked and no more replies can be posted.