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) »
  • Prepopulate a profile field from URL query string
Pages: [1]

Author Topic: Prepopulate a profile field from URL query string  (Read 2776 times)

Shai

  • I post frequently
  • ***
  • Posts: 202
  • Karma: 8
    • Content2zero
  • CiviCRM version: 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 7
  • MySQL version: 5.5.x
  • PHP version: 5.3.x, 5.4.x
Prepopulate a profile field from URL query string
March 15, 2010, 08:39:34 am
Is it possible to pre-populate a profile field via the URL string?

If so, what is the syntax/where is it documented?

Thanks,

Shai
Don't miss out! Sign up now for free expert advice on CiviCRM's new StackExchange help site.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Prepopulate a profile field from URL query string
March 15, 2010, 10:19:40 am
You can pre-populate field in profile search mode using: http://drupal.demo.civicrm.org/civicrm/profile?gid=1&reset=1&first_name=Hello etc.

If you want to pre-populate for profile create mode then you should use buildForm hook.

HTh

Kurund
Found this reply helpful? Support CiviCRM

Shai

  • I post frequently
  • ***
  • Posts: 202
  • Karma: 8
    • Content2zero
  • CiviCRM version: 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 7
  • MySQL version: 5.5.x
  • PHP version: 5.3.x, 5.4.x
Re: Prepopulate a profile field from URL query string
March 15, 2010, 10:51:11 am
Kurund, thanks... can you point me to the documentation for buildForm hook.

Thanks,

Shai
Don't miss out! Sign up now for free expert advice on CiviCRM's new StackExchange help site.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Prepopulate a profile field from URL query string
March 15, 2010, 10:57:42 am
http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmbuildForm

For examples you should check http://fisheye2.atlassian.com/browse/CiviCRM/branches/v3.1/drupal/civitest.module.sample?r=25590

Hth

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Prepopulate a profile field from URL query string

This forum was archived on 2017-11-26.