CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Custom field for Personal Identity Number and validation of ditto
Pages: [1]

Author Topic: Custom field for Personal Identity Number and validation of ditto  (Read 1037 times)

mikael.andersson@charity.se

  • Guest
Custom field for Personal Identity Number and validation of ditto
October 23, 2009, 05:40:18 am
How do I accomplish a custom field for personal identity number (the corresponding number in UK is the social security number)?

It is composed of Year, Month and Day of birth and a four digit number (X). All of it needs to be validated.
YYYYMMDD-XXXX

Any ideas how I can accomplish this?

Thanks,

Mikael

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom field for Personal Identity Number and validation of ditto
October 23, 2009, 07:00:48 am

Set up a custom field for the PIN (in an existing or new custom group)

Implement the validate hook:

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification

to ensure the entered input is a valid PIN

You could potentially also use external_identifier for this purpose which is a core field in civicrm_contact

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mikael.andersson@charity.se

  • Guest
Re: Custom field for Personal Identity Number and validation of ditto
October 23, 2009, 08:08:44 am
OK, and then just add the hook you are referring to to the external identifier?

Thanks,

Mikael

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Custom field for Personal Identity Number and validation of ditto

This forum was archived on 2017-11-26.