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 CiviMember (Moderator: Deepak Srivastava) »
  • How to create autocomplete for organization name
Pages: [1]

Author Topic: How to create autocomplete for organization name  (Read 1288 times)

dsdart

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
  • CiviCRM version: 4.4
  • CMS version: Drupal 7.25
  • MySQL version: 5.1.41
  • PHP version: 5.3.1
How to create autocomplete for organization name
February 11, 2014, 11:24:35 am
My research pointed me to several ways to accomplish this, but most of it looked like old information.  So my question is - what is the best way to have autocomplete on a membership application for an organization name that is in an onBehalfOf profile?

We had this on Civi 3.x, but it isn't working after I upgraded to 4.4, so I am trying to debug this or redo it if I have to.  I don't know how it worked in 3.x because I didn't set it up.

Has anybody else had this issue and solved it?

« Last Edit: February 11, 2014, 11:32:02 am by dsdart »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: How to create autocomplete for organization name
February 11, 2014, 12:04:18 pm
You can adjust the settings of your contact reference custom field (I assume that's what you're talking about) to suit your needs. Any params accepted by the api will work, e.g.
contact_type="Organization"
Try asking your question on the new CiviCRM help site.

dsdart

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
  • CiviCRM version: 4.4
  • CMS version: Drupal 7.25
  • MySQL version: 5.1.41
  • PHP version: 5.3.1
Re: How to create autocomplete for organization name
February 11, 2014, 12:05:20 pm
How do I do that?

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: How to create autocomplete for organization name
February 11, 2014, 01:01:37 pm
also check your drupal permissions for one or both of
CiviCRM: access AJAX API
CiviCRM: access contact reference fields
EDIT and of course CiviCRM: access all data
« Last Edit: February 27, 2014, 05:56:16 pm by petednz »
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

dsdart

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
  • CiviCRM version: 4.4
  • CMS version: Drupal 7.25
  • MySQL version: 5.1.41
  • PHP version: 5.3.1
Re: How to create autocomplete for organization name
February 12, 2014, 05:03:34 pm
I checked the permissions and CiviCRM: access AJAX API was checked but not CiviCRM: access contact reference fields.  Checking it did not make a difference (no doubt for the reason listed below).

The organization details for the contribution page are currently in a profile added on the 'include profile' page and there is no choice to make the org name a 'contact reference' in profile settings. 

So how do I include the organization details?  Do I need to recreate the org details section as a custom data group?  I don't see how to add a custom group on the contribution pages.

Is there another way to add renewal forms other than using a contribution page?

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: How to create autocomplete for organization name
February 12, 2014, 05:24:53 pm
sorry i don't seem to be helping much but the 'register on behalf of' seems to 'just work' on all our set ups and I can't twig why this isn't firing for you

not sure that demo'ing on demo helps but i added 'on behalf of' on http://drupal.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=2

and made pd have Permission over DD - so that autofilled

i then added another permissioned relationship for pd to FF which then means pd get an autocomplete

does that help you at all or am i proving something you already know and have working?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

dsdart

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
  • CiviCRM version: 4.4
  • CMS version: Drupal 7.25
  • MySQL version: 5.1.41
  • PHP version: 5.3.1
Re: How to create autocomplete for organization name
February 12, 2014, 05:37:15 pm
"does that help you at all or am i proving something you already know and have working?"

Yes it is helping - I appreciate your hanging in there with me.

dsdart

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
  • CiviCRM version: 4.4
  • CMS version: Drupal 7.25
  • MySQL version: 5.1.41
  • PHP version: 5.3.1
Re: How to create autocomplete for organization name
February 13, 2014, 11:00:12 am
I had to dig into the code, but discovered that the permission required is "view all contacts".  I don't think I want to give anonymous users this permission, so I guess the next step is figuring the ramifications of this.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: How to create autocomplete for organization name
February 13, 2014, 11:56:24 am
well sorry that this seems beyond me to help on since i still feel we are spiralling around
but
if the contact has permissioned relationship to the org then I don't believe they need 'view all contacts'
so perhaps your use case is different and you are wanting anyone to get to the autocomplete and find 'all' organisations so they can pick they one they are associated with - i don't think this was the original description and so don't think this is what you said you were needing so feel a bit lost
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

dsdart

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
  • CiviCRM version: 4.4
  • CMS version: Drupal 7.25
  • MySQL version: 5.1.41
  • PHP version: 5.3.1
Re: How to create autocomplete for organization name
February 13, 2014, 01:05:26 pm
All the member organizations should be in the drop down list - it looks like I need to set up an ACL for this?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: How to create autocomplete for organization name
February 16, 2014, 09:11:15 am
I discussed this on IRC and I should clarify that dsarts problem affects checksum-authenticated users but not logged in users. So, there is a disconnect in the authentication - although, interesting, not the one I thought when we talked on IRC as even giving 'access all contacts' wouldn't have helped if JS didn't understand 'at all' who the use was
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

dsdart

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
  • CiviCRM version: 4.4
  • CMS version: Drupal 7.25
  • MySQL version: 5.1.41
  • PHP version: 5.3.1
Re: How to create autocomplete for organization name
February 21, 2014, 02:49:18 pm
Interestingly, the autocomplete works with the webform civicrm integration module.  I haven't tested it with checksum yet, though.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: How to create autocomplete for organization name
February 21, 2014, 05:10:27 pm
Not surprised by that. That module is totally separate and mostly uses the api rather than core civicrm functions.
Try asking your question on the new CiviCRM help site.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: How to create autocomplete for organization name
February 27, 2014, 05:57:51 pm
flagging that similar problem for user here was that they did not have permission for CiviCRM: access all custom data

http://forum.civicrm.org/index.php/topic,31589.0.html
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • How to create autocomplete for organization name

This forum was archived on 2017-11-26.