How can I make the function input should not be empty to work?

In my application I am creating single page application. Where the user every time they click on the arrow, a new group appears. My problem is that even though I mark the fields that should be mandatory, the workflow continues. Also try to put it on the button itself, saying that if certain fields are empty not to proceed, I even created an alert, but it randomly skips some input fields. And to show the groups, I created custom state, called current page, of type number, where I left the number 1 as the default. So, the first group, as well as all the others, are to not appear on page load. The first one appears, because I say that when the page is 1, it appears. And every time the n ext button is clicked, +1 is added to the value and the back button is decreased by 1. I’m not doing it in a pop-up because I know it creates problems in this issue

What is the best way to resolve this issue?

Are you using only one Next button or does every “page” has its own Next button?

If you’re using only one “next” button for all groups this is what I think might work for you. On the “Next” Button’s Workflow use a conditional “Only When “Group 1” is Visible and X field’s value is not empty and Y field is not empty…” and for the actions of this workflow make it hide Group 1 and show Group 2 (the number thing that you did +1 or -1 will work too for this part)

Then you Copy the workflow and paste it, change the conditional to “Only when Group 2 is Visible and Z field is not empty and…” then in this workflow’s actions you hide the second group and show the third (or +1, whichever method you’re using, conditionals or hide element actions)

The whole point is that, regardless of what method you use to “Show/hide” each group, SPLIT into different workflows. Many people might do a single workflow and a bunch of actions with “Only When” conditionals but I have found in my testings that this causes some issues where it skips or ignores certian rules but if you split each action into different workflows for the same “Button” element it is far less likely to trigger the wrong workflow.