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) »
  • Hiding Custom Data on the Add Group page
Pages: [1]

Author Topic: Hiding Custom Data on the Add Group page  (Read 942 times)

nrporter

  • Guest
Hiding Custom Data on the Add Group page
October 27, 2009, 05:51:38 am
Hi there, I am attempting to hide a custom data group that has been added to the group object. My script is successful in the edit group page, but does not work on the add group page. To the best of my knowledge, it seems like the pageRun hook is not triggered on the add group page. Is this the case, or is there another work around in place to fix the problem?

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: Hiding Custom Data on the Add Group page
October 27, 2009, 06:53:41 am

i think the main problem is that in th ad group page, the custom group is retrieved via ajax. If you use firebug, you will see the sequence of ajax calls

in edit group page, we know exactly what custom groups to pull in and do it inline

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

nrporter

  • Guest
Re: Hiding Custom Data on the Add Group page
October 27, 2009, 07:00:14 am
Yes, but the add page isn't responding to any pageRun hooks that I can tell. If no hooks are fired, is there any way to edit the content of the page? Thank you as well for your help as always.

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: Hiding Custom Data on the Add Group page
October 27, 2009, 07:07:42 am

actually its a form so the pageRun is not called

the hooks called are

buildForm (on rendering the page)
validate and postProcess

the edit page also calls the above hooks (that form is embedded in a page, and hence it also calls the pageRun hook)

That form might not render custom groups via ajax (i was wrong in my prior post)

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

nrporter

  • Guest
Re: Hiding Custom Data on the Add Group page
October 27, 2009, 07:13:53 am
Thank you sooooo much for the help. I must once again say that you guys are great. Keep up the amazing work :).

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Hiding Custom Data on the Add Group page

This forum was archived on 2017-11-26.