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 CiviContribute (Moderator: Donald Lobo) »
  • Is it possible to convert the Contribution Source field to a select list?
Pages: [1]

Author Topic: Is it possible to convert the Contribution Source field to a select list?  (Read 900 times)

jimmyjam

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
Is it possible to convert the Contribution Source field to a select list?
August 25, 2010, 09:44:19 am
I would like to convert the Contribution Source field to a select list (dropdown list). Is this possible?

Data entry errors in this field are making it hard for my organization to do reporting. We want to enter a list of possible sources, and make the user choose one.

Thanks,
James

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: Is it possible to convert the Contribution Source field to a select list?
August 25, 2010, 09:48:19 am

use a hook to convert the text field to a drop down

check:

http://civicrm.org/blogs/allenshaw/using-hooks-change-individual-prefix-auto-complete-text-input

(this does it in reverse, your case is easier). if you are not a coder, consider hiring someone from http://civicrm.org/professional/

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

jimmyjam

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
Re: Is it possible to convert the Contribution Source field to a select list?
August 25, 2010, 09:57:33 am
Thanks, Lobo.

One quick follow-up question: if I convert the field to a select list, what happens when CiviCRM automatically adds data to the field from an online contribution form? Will it cause an error? Or add a new entry to the list of choices?

James

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: Is it possible to convert the Contribution Source field to a select list?
August 25, 2010, 10:01:58 am

u'll need to handle this scenario in your hook code

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 CiviContribute (Moderator: Donald Lobo) »
  • Is it possible to convert the Contribution Source field to a select list?

This forum was archived on 2017-11-26.