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) »
  • default text and behavior for contact select field
Pages: [1]

Author Topic: default text and behavior for contact select field  (Read 680 times)

pyrojonc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.6.0
  • CMS version: Drupal 7.35
  • MySQL version: 5.5.40
  • PHP version: 5.5.17
default text and behavior for contact select field
March 25, 2015, 09:26:12 pm
I have a public form that has a custom contact select field with a list of schools.  I need to change the default text from " - choose contact - " to " - Select School - " and I would like to customize the way the search field works so that it always searches from the beginning as a phrase (e.g. "notre dame high" would not return results with everything that contains "notre" or "dame" or "high", but only schools that start with "nortre dame high")

Any idea where to find the template / javascript files that would make that possible?

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: default text and behavior for contact select field
March 26, 2015, 12:24:48 am
That depends entirely on how your public form has been created? Is it a CiviCRM profile, is it a Drupal Webform with CiviCRM integration, is it a View, is it a standalone form that uses the CiviCRM API, is it a stand alone form that retrieves data directly from the CiviCRM database? You need to give us some more information to be able to help you  :)
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

pyrojonc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.6.0
  • CMS version: Drupal 7.35
  • MySQL version: 5.5.40
  • PHP version: 5.5.17
Re: default text and behavior for contact select field
March 26, 2015, 08:41:35 am
Its a CiviCRM Profile stand alone form.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: default text and behavior for contact select field
March 26, 2015, 09:02:01 am
Which version of Civi are you using? The bug you're describing (search phrases containing spaces returning too many results) should have been fixed in 4.5.
Try asking your question on the new CiviCRM help site.

pyrojonc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.6.0
  • CMS version: Drupal 7.35
  • MySQL version: 5.5.40
  • PHP version: 5.5.17
Re: default text and behavior for contact select field
March 26, 2015, 09:46:42 pm
I'm on CiviCRM 4.5.6 on Drupal 7.34. There was a setting that I played with about auto wildcards and that stopped the search from returning results that had text starting in the middle of a word, but as soon as I add a space I get wildly mixed results.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: default text and behavior for contact select field
April 04, 2015, 05:37:44 pm
I guess the fix did not include custom fields.
Are you interested in helping to fund or work on porting the fix over to support custom fields?
Try asking your question on the new CiviCRM help site.

pyrojonc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.6.0
  • CMS version: Drupal 7.35
  • MySQL version: 5.5.40
  • PHP version: 5.5.17
Re: default text and behavior for contact select field
April 13, 2015, 09:06:42 am
I just saw this reply.  Yes Coleman, I would be happy to help with porting the fix over to custom fields.  How do I get started?

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: default text and behavior for contact select field
April 13, 2015, 10:43:35 am
The fix was simply to replace spaces with wildcards. So I'd add something like str_replace(' ', '%', $input) to CRM_Contact_Page_AJAX::contactReference
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • default text and behavior for contact select field

This forum was archived on 2017-11-26.