1
0
-1

I have a requirement where a form should only be able to be submitted if some combination of values are entered. For instance, the user must enter values in 3 out of 5 fields, or if they enter a value in field A then they must enter a value in field B.

Assuming there is a way to do this in javascript, I would also like the validation checked on the server side so that just disabling or hiding the submit button is not enough to bypass the validation. Any thoughts or pointers?

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi, for client-side validation yes you can add your own custom JavaScript within a Custom HTML element. On the server-side, you can add the validation code within a form validator, for example the BeanShell Validator.

      1. JogetUser

        Thank you Anders, I was confused that the validators are associated with a particular field, but it makes sense that you can test more than field in the Beanshell and choose to invalidate the submission that way.

      CommentAdd your comment...