Tom Atkinson Posted January 3, 2020 Share Posted January 3, 2020 Hi, I need to check if a custom client field is unique on registration. I found https://whmcs.community/topic/68137-check-if-custom-field-value-is-not-used-already-unique/ but that is from 10 years ago? Is there any up to date guidance please? Best Regards, Tom 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 6, 2020 Share Posted January 6, 2020 Hi Tom, On 03/01/2020 at 18:53, Tom Atkinson said: I need to check if a custom client field is unique on registration. I found https://whmcs.community/topic/68137-check-if-custom-field-value-is-not-used-already-unique/ but that is from 10 years ago? the last suggestion in that thread, though a little dated coding wise, is still basically what you would need to do. On 03/01/2020 at 18:53, Tom Atkinson said: Is there any up to date guidance please? these days, it would probably need the ClientDetailsValidation hook - using that, you check if the entered custom field value in unique by seeing if the value for that field already exists in the database (specifically the tblcustomfieldvlaues table) - if it exists, you can return an error to tell the user to enter another value... if it doesn't already exist, the validation is passed and the account created. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.