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 value for a profile field?
Pages: [1]

Author Topic: Default value for a profile field?  (Read 1667 times)

mikael.andersson@charity.se

  • Guest
Default value for a profile field?
October 22, 2009, 07:36:24 am
I have created a profile which has a field of the type 'Contacts' and 'Group(s)' and would like to set a default value for it. How do I do this?

Thanks,

Mikael

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: Default value for a profile field?
October 22, 2009, 08:46:15 am

you will need to use the hook_civicrm_buildForm

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification

There is a sample file in the distribution: drupal/civitest.module.sample

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 Profiles (Moderator: Dave Greenberg) »
  • Default value for a profile field?

This forum was archived on 2017-11-26.