I am using freemember forms to create my "registration" page. I have two custom member fields "employee last name" and "employee id". I added them in the "custom member fields" section. I need to make these two fields unique and fail the registration process if the values entered in the registration process are duplicates.

I could not find "unique" attribute in the custom member fields. Only "required" attribute. any help in this regards will be much appreciated.

1 Answer 1


I don't think that there is anything in Freemember that you can use to force the values to be unique out of the box. Having said that you can do it with a bit of AJAX in your template. MadeByHippo posted an example of it on their blog a while back that might be of interest for you. ClientSide Username Checking

  • 2
    Since Carl's example uses segment variables, I recommend using the Active Record plugin rather than the SQL module to minimize security risks from SQL injection.
    – kmgdev
    Nov 4, 2013 at 17:56
  • That is a great point Nov 4, 2013 at 19:24
  • I did the ajax call and tested with the member fields DB to force uniqueness. Nov 6, 2013 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.