A custom state is a little bit of temporary data that is attached to something on the page. Once you move on from a page - it is gone. And you can attach it to most things … so don’t lose it
The “Conditional” tab on the Button is about how the button is displayed, not about actions. I am jumping ahead a little here, but imagine we have a page number field … when the page number is 1 then we disable the “Prev” button.
Which is exactly what I have done here…
pageno is a Custom State that I have added to the page. It is just a number that I am using.
On page load I set it to 1.
(you set the custom state when you do the action, you will see you can add a new one if you drop down the Set State action).
On page back and forward I + 1/ - 1 respectively.
And finally … how to do the redirect. I have duplicated the action for “Next”.
If this is the last page (page number = number of pages in the repeating group) then we do the redirect (otherwise we just show the next page and add 1 to pagno).
I have also put in a page counter at the top left for you, it helps in testing and looks nice
Hope that helps.