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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • custom search vs profile search
Pages: [1]

Author Topic: custom search vs profile search  (Read 956 times)

josue

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
    • PTP
  • CiviCRM version: 3.4.4, 4.1.1
  • CMS version: Drupal 6.24, Drupal 7.12
  • MySQL version: 5.0
  • PHP version: 5.2
custom search vs profile search
September 07, 2010, 06:39:02 am
hey folks,

i am struggling with making a search that will only show the fields of a custom group. i was very happy to realize that a profile search could do that (http://drupal.demo.civicrm.org/civicrm/profile?reset=1&gid=8 is an example) but saddened when i realized that that method would not give me access to the actions. and i really need actions.

in trying to go the custom search route i have not been able to figure out how to call custom fields and their options. in this post (http://forum.civicrm.org/index.php?topic=11228.0) lobo mentions the CRM_Core_BAO_CustomOption::getCustomOption function. but i have not been able to figure out how to use it.

first, i think, is the buildForm function in the custom search:

Quote
function buildForm( &$form ) {
        $primary_group = array('' => ts('- select group -')) + CRM_Core_BAO_CustomOption::getCustomOption( );
        $form->addElement('select', 'primarygroup_158', ts('Primary Group'), $primary_group);

    }

the above gets me nothing. a little help would be much appreciated.

or if you know how to give the profile search access to the actions, i would take that too :)

--josue

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: custom search vs profile search
September 07, 2010, 07:04:35 am
in advanced search, there's an option to view results using a profile. that should do the trick

a pure profile search is very frontend-facing oriented -- so it does not include administrative actions
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

josue

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
    • PTP
  • CiviCRM version: 3.4.4, 4.1.1
  • CMS version: Drupal 6.24, Drupal 7.12
  • MySQL version: 5.0
  • PHP version: 5.2
Re: custom search vs profile search
September 07, 2010, 08:32:57 am
thanks for the reply.

in advanced search, what i am trying to avoid is the overwhelming scroll that ensues if you have lots of custom fields. i decided that the immediate workaround was to move the custom group to the top of the custom fields section. i will add to this a view, so that they can see the results. thx!

is it possible to include admin actions in a profile search? how hard would that be? having more custom search options was very exciting until i realized the limitations...

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • custom search vs profile search

This forum was archived on 2017-11-26.