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 CiviEvent (Moderator: Yashodha Chaku) »
  • Auto suggest names for the "Current Employer" Field
Pages: [1]

Author Topic: Auto suggest names for the "Current Employer" Field  (Read 985 times)

kumbhare

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: drupal 7.28
  • MySQL version: 5.6
  • PHP version: 5.5
Auto suggest names for the "Current Employer" Field
June 02, 2014, 07:57:14 pm
Hi,
We have a registration form for which a user needs to enter (among other things) his current employer (e.g. institution/university etc.). For past couple of years we have observed that users enter non-standard values (e.g. University of X, UX, UoX etc.) which causes confusion while creating reports.

I was wondering if there is a way to auto suggest and select names while the user types a partial value in that field if that organization already exists in our database (we can either pre-populate a bunch of names in advance or preferably it is added to the database when someone uses that name for the first time).

Thanks,
Alok

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: Auto suggest names for the "Current Employer" Field
June 03, 2014, 12:20:57 am
In my civicrm the employer field is an autocomplete field. So I think it is alrady there but you cann't prevent users from creating duplicates. However you can instruct them but also make them more responsible to give them more responsibility. As an IT guy I have the opinion that I never know nor want to know the data the users enter. It is their responsibility and they know the context and they should know when to do what on entering data. So if you have univisity of X and someone is lazy and search only for uox and doesn't find anything and enter uox creating a duplicate I as an IT guy assume they have a good reason to be lazy and to do so, I cannot change their attitude with a system. However I can help them when they ask my this question as a user because then their are concerned about the duplicates and the first thing you want to achieve is that the user is concerned about entering duplicates.

When you a semi-public registration form then you should have some checking in after the registration. This is probably manual labour but it keeps your consistency of the system. I am not sure if you use the civicrm profile fields or drupal webforms but if you use the lather you can prevent the user from creating new university to select only those from a list (and maybe add a seperate form for entering a new uni).
Developer at Edeveloper / CiviCoop

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Auto suggest names for the "Current Employer" Field
June 03, 2014, 05:58:20 am
I think jaapjansma's answer was referring to the "back-end" system for authorized CiviCRM users. However from your question I infer that the form might be a profile and it might be for less-privileged users, maybe even anonymous ones.
In profiles Civi does not provide this feature since it is a potential security risk to allow anonymous users to retrieve a listing of organizations in your database just by typing a few letters -- be careful about this whatever you do.
2 options:
  • Use webform-civicrm integration as it provides this feature without any need for custom coding. Be sure to read the instructions :)
  • Write a custom api (to get around the permissions issue) and some custom js to perform the lookup on your profile. Note that the autocomplete plugin has changed in 4.5 so to future-proof your code look at using the jQuery UI autocomplete (which is shipped in core but buried under the other one).
Try asking your question on the new CiviCRM help site.

kumbhare

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: drupal 7.28
  • MySQL version: 5.6
  • PHP version: 5.5
Re: Auto suggest names for the "Current Employer" Field
June 03, 2014, 02:36:48 pm
Thanks jaapjansma and Coleman.
Sorry for not being clear. I didn't think about the security issues you mentioned.

Actually, for some other reason, this year we are going to allow registrations only for Authorized users. And we are using CiviEvent "online registration" feature with civicrm profiles.

In this case do I still have just the two options you mentioned? or is there a way to get the auto suggest in civicrm profiles for authorized users?

Regarding jaapjansma's comment: We are hoping that with auto suggest, the number of duplicates will reduce (as you mentioned, avoiding them completely may not be possible). We will still do some manual work to deduplicate while generating the reports just trying to reduce it.. :) 

Thanks
Alok
« Last Edit: June 03, 2014, 03:03:43 pm by kumbhare »

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: Auto suggest names for the "Current Employer" Field
June 04, 2014, 02:02:09 am
The registration for events has an option for authirzed users to pre-fill in their details.
Developer at Edeveloper / CiviCoop

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Auto suggest names for the "Current Employer" Field

This forum was archived on 2017-11-26.