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) »
  • Set default value of custom data field from URL
Pages: [1]

Author Topic: Set default value of custom data field from URL  (Read 1665 times)

DamonKirkpatrick

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 0
  • One job but so many responsibilities.
    • Friends of Georgia State Parks
  • CiviCRM version: 4.5.2
  • CMS version: Drupal 7.35
  • MySQL version: 5.1.48
  • PHP version: 5.3.8
Set default value of custom data field from URL
January 25, 2009, 07:44:40 am
I currently use a custom data field to allow users to choose where their contributions will go from our main contribution page.  I would like to be able to use this same page but to default the value of the custom data field based on the URL. 

For example, our main page has dropdown options of None, Apples, Oranges, Pears.  The default on the "Support our Causes" page is None.  If a user has been on our "Support Oranges" site, I would like them to be able to click on "Contribute to Oranges" and go directly to our main donation page with the custom data field already set to "Oranges".

My assumption is that I can pass the value in the URL like &customdata4=Oranges.  Am I correct or is there another way of doing this without creating an entirely new donation page dedicated to Oranges?

Thanks in advance!

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: Set default value of custom data field from URL
January 25, 2009, 10:54:33 am
This might help:
http://forum.civicrm.org/index.php/topic,4336.0.html
http://forum.civicrm.org/index.php/topic,5636.0.html

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Set default value of custom data field from URL

This forum was archived on 2017-11-26.