2

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

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

3
  • 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 '13 at 17:56
  • That is a great point – Justin Long Nov 4 '13 at 19:24
  • I did the ajax call and tested with the member fields DB to force uniqueness. – Bharath Parlapalli Nov 6 '13 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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