1 Reply Latest reply on Nov 16, 2009 11:28 PM by Dallas Kuhn

    Help setting validation based on route selected

    arlivecycle

      If the LC form only has one submit button, how do you set a validation on submit based on the route selected when running forms in workspace?

       

      For example, if users have the option to Approve or Reject a form, can you determine which route they have selected and validate fields accordingly? So that if "reject" is selected we can validate that the reject comment field was completed, and if "approve" is selected we can validate that the form was signed?  Is there some property of the submit button or process field that makes this distiction?

       

      Thanks for your help!

        • 1. Re: Help setting validation based on route selected
          Dallas Kuhn Level 3

          You can use a JavaScript if-else statement on the preSubmit event of the button. Do a check to see which of the fields are populated, then perform the required action.

          You could even hide the buttons, then if the user fills in a comment in the reject field, you simply show the reject button and keep the approve button hidden. You could have a pop-up when the form opens informing the user of the document's steps / process.