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) »
  • Creating a hyperlink directly to a search result
Pages: [1]

Author Topic: Creating a hyperlink directly to a search result  (Read 675 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Creating a hyperlink directly to a search result
April 10, 2012, 09:44:49 am
I would like to create some shortcuts to various common searches. For example, the "Search ... Find Activities" filtered on the last 3 months, where the "source contact" is set to a certain contact.     Where is the documentation for what the Query string would look like to create the correct URL? 

Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

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: Creating a hyperlink directly to a search result
April 10, 2012, 10:59:07 am

I dont think u can populate most fields via a URL. You can potentially do this by implementing the buildForm hook for the relevant forms.

I do think you can make it generic and extend the codebase to allow folks to set default values for most fields in most forms via the URL. This will involve checking the form elements and the GET params and then using setDefaultValues on the form

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) »
  • Creating a hyperlink directly to a search result

This forum was archived on 2017-11-26.