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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Modify Options in drop down (ajax pulled)
Pages: [1]

Author Topic: Modify Options in drop down (ajax pulled)  (Read 1113 times)

brettev

  • Guest
Modify Options in drop down (ajax pulled)
July 01, 2009, 08:03:55 am
I'm trying to add a relationship to a user, and I have a list of schools as the options in the drop down. It is at this url:

civicrm/contact/view/rel?cid=102&action=add&reset=1

The problem is, there are multiple schools with the same name in the system. I have a custom field called District that shows what district they are in, and I'd like to prepend the name of the school with the name of the District. Where would I go about modifying that? What function would I write that would overwrite one of the standard functions that generates that? I'm familiar with OO programming, but never really done Civi development. I'm a drupal developer looking to get more friendly with civi, so hopefully this is a good experience here. Thanks in advance for any pointers or direction.

Brett

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: Modify Options in drop down (ajax pulled)
July 01, 2009, 10:23:46 am

for now the easiest way would be to overwrite:

CRM/Contact/Page/AJAX.php, function search, line 249 (which is specific for the relationship search case)

Those function dont have "hooks" as yet, so your best bet would be to modify the file in a custom php directory (using the same structure, and set the custom path in Administer CiviCRM >> Global Settings >> Directories)

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Modify Options in drop down (ajax pulled)

This forum was archived on 2017-11-26.