More control for "current employer" fields in public forms

Gepubliceerd
2016-04-04 12:34
Written by
AllenShaw - member of the CiviCRM community - view blog guidelines
Click to play: "CiviCRM: Public autocomplete of organization names"
CiviCRM provides a "current employer" field for all individual contacts, and that field does some cool stuff. Namely, when you type an organization name into this field and save the record, CiviCRM automatically creates an employer-employee relationship between the individual and the organization. It's very convenient, and CiviCRM even presents it as an autocomplete when editing an individual contact record.
 
You can also use it in a profile, for example to allow individuals to indicate their employer so that they can get some benefit by virtue of the employing organization's membership.  But in a public-facing profile, the autocomplete functionality isn't offered.  (It's a bit of a privacy concern to present all of your organizations as possible autocomplete options in a public form.)  Instead, CiviCRM just takes whatever you type in, matches to an existing organization record -- or creates a new organization with that name -- and then creates the employer-employee relationship.
 
Problem is, when this field isn't an autocomplete, you're leaving the door open for typos and abbreviations, which will lead to duplicate records being created for an employer. Wouldn't it be cool to remove that possibility?
 
Wouldn't it also be cool to limit the organizations that a user could select? For example, if you may want them only to select from a short list of current member organizations, rather than allowing them to create an employee relationship with any organization in your system.
 
Here's an extension that does all that. Check out the video above for a better explanation, and see the extension page here: https://civicrm.org/extensions/public-autocomplete-of-organisation-names
 
This extension has been around for a while on github, exellently maintained by Xavier Dutoit (Tech To The People), and Joinery has been able to make some very cool improvements thanks to Xavier's assistance, Stuart Gaston (Korlon) finding a sponsor, and Nonprofit Association of Oregon sponsoring.  If you think of cool improvements to be made for related use cases, please tweet me @JoineryHQ (or in comments below) any time to discuss.

 

Comments

Great to see this option with a few more bells and whistles. Good work by you and X.