1
0
-1

Hi Team

I am having 5 pages in my Form. I want to control the page navigation. For example, other than my my current active page all other pages should be in disabled mode, only on click on continue the second page should get enabled. Why because i having some validations on Continue, user should be able to navigate to second page on success of those validations.

 

Please help on this.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Ammu,

      That should be the default behavior, as long as you have a validation failure on your page, and page validation mode is set correctly.  

      Check you have Sequential validation mode set on your page controller.

      Test by returning an error string from your page validation rule, such as:

      You can also test by adding a mandatory field on a page, and try to navigate to the next page before supplying a value in the field.

      1. Ammu Balasundaram

        Hi Bill,

        Thanks for your reply. 

        We have this done. My query is that I am having two pages in a form and I am having some set of conditions and API calls in continue button for the navigation to next page, but I am able to navigate to the next page by clicking on the page level navigation bar, because of this action the conditions and calls for API are failing. 

        Is there a way to prevent page navigation without clicking continue button? 
        or Is there a way to write conditions and calling API on page navigation which we are implemented on the continue button click action?

      2. Bill Frost

        Hi Ammu,

        It sounds like you don't have a validation rule on the page you navigate away from.  If you did, the rule would fire when you navigate away from the page, regardless of whether you clicked the Continue button, or the page level navigation bar.

        I would suggest you move your code out from behind the Click event on the Continue button, and move it to a validation rule on the page.  When you get the results back from your API calls, either return an error string if you want to prevent navigation, or true to allow navigation.  The validation rule code will be executed regardless of how you navigate.

      CommentAdd your comment...