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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • How do I use records in Smart Group as Alphanumeric Select in Custom Field?
Pages: [1]

Author Topic: How do I use records in Smart Group as Alphanumeric Select in Custom Field?  (Read 860 times)

charleslcso

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
  • CiviCRM version: 3.2.5
  • CMS version: Drupal 6.19
  • MySQL version: 5.1.50
  • PHP version: 5.3.2
How do I use records in Smart Group as Alphanumeric Select in Custom Field?
January 05, 2011, 10:47:34 pm
Hello

I have 1500 contacts of type Organization, of sub-type "Church", which would like to let users choose via a pull-down menu. I created a Smart Group which holds all records of sub-type "Church". Then use Custom Field Sets and Custom Fields, hoping to be able to link these "Church" records as Alphanumeric | Select type. No dice.

Now I'm at dead end.

What is the best practice to do this? Please kindly advise!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How do I use records in Smart Group as Alphanumeric Select in Custom Field?
January 06, 2011, 03:16:55 am
Hi,

You can create a field  contact reference, and modify to limit what is on the autocomplete to get only the churches instead of all contacts (either with a hook or custom template):

http://civicrm.org/blogs/xavier/how-customise-contact-reference-custom-field

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

charleslcso

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
  • CiviCRM version: 3.2.5
  • CMS version: Drupal 6.19
  • MySQL version: 5.1.50
  • PHP version: 5.3.2
Re: How do I use records in Smart Group as Alphanumeric Select in Custom Field?
January 12, 2011, 04:25:30 am
Hi Xaiver

The AJAX/jQuery script is used similar to the field in the upper left corner, of which user must start to type something before resultset is returned. Is this correct?

I need the resultset to form a pull-down menu before presenting to users. How do I make it work?

charleslcso

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
  • CiviCRM version: 3.2.5
  • CMS version: Drupal 6.19
  • MySQL version: 5.1.50
  • PHP version: 5.3.2
Re: How do I use records in Smart Group as Alphanumeric Select in Custom Field?
January 12, 2011, 07:54:52 pm
What I'm trying to do is to set up Profiles for new user registration. The new users can choose which pre-defined group they belong to. The real-life case is that our church is broken into 7 large groups, each serving people of special needs. As we have 1000+ members, we would like those members capable of using computers to create accounts themselves (and for other computer-illiterate members), and specifying which group they currently belong to. If this functionality is not available, the church admin then have to go through all records, and place records in the correct groups manually. This is going to be a nightmare because the manual effort needed to collect the group info for each member is not going to be small.

If setting up an Alphanumeric Select is not workable, what other options are available to making this work?

Kindly share your thoughts on this subject!

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: How do I use records in Smart Group as Alphanumeric Select in Custom Field?
January 12, 2011, 08:14:54 pm

you can use the buildForm hook and inject the alphanumeric select (and customize the template and store the selected value via the postProcess hook)

You will need php and a bit of mysql experience / expertise to do so

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

charleslcso

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
  • CiviCRM version: 3.2.5
  • CMS version: Drupal 6.19
  • MySQL version: 5.1.50
  • PHP version: 5.3.2
Re: How do I use records in Smart Group as Alphanumeric Select in Custom Field?
January 12, 2011, 08:20:38 pm
Quote from: Donald Lobo on January 12, 2011, 08:14:54 pm

you can use the buildForm hook and inject the alphanumeric select (and customize the template and store the selected value via the postProcess hook)

You will need php and a bit of mysql experience / expertise to do so

lobo

Hi Donald,

Thanks for the info.

I guess that's not a small / quick thing to do. As we would like to go live ASAP, I'll leave it for a while.

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: How do I use records in Smart Group as Alphanumeric Select in Custom Field?
January 13, 2011, 07:58:24 am

for someone familiar with drupal/civicrm/php/mysql, that should not take more than 3-4 hours to write and test

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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • How do I use records in Smart Group as Alphanumeric Select in Custom Field?

This forum was archived on 2017-11-26.