1
0
-1

Hi,

I have a form with several fields. Is it possible to have a combination of 2 fields in the form to be unique? I know I can do it directly on the database , but in this case I think I would get an error when the user tries to enter a non unique value, but in this case it should show a message(not error) to the user.


Thanks!


    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Maybe you can try using the Duplicate Value Validator plugin in your form.

      1. genti

        Yes of course, but if I use Duplicate value validator it allows me to put only one column to be unique, but I want a combination of 2 columns or form fields.

      2. Matthew King

        I think you have to write your own custom plugin to perform a multi-field duplicate validator, see Developing Plugins and extend the plugin via the source code.

      CommentAdd your comment...