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 Import (Moderator: Yashodha Chaku) »
  • Disabling "add to groups" option on import
Pages: [1]

Author Topic: Disabling "add to groups" option on import  (Read 878 times)

YMNathaniel

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 1
Disabling "add to groups" option on import
September 07, 2010, 01:35:16 pm
Our client wants to remove the "add to new group" and "add to existing groups" options in the import process.

We haven't dug into the code yet but was hoping someone could put us in the right direction?

Only allowing privileged users to use these features would be nice, but we're also open to disabling them completely.

Thanks!!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Disabling "add to groups" option on import
September 07, 2010, 01:44:19 pm
If you can find the place that assigns the 'add to groups' control to the form you can put an 'if has permission then' around it. You'd need to add the permission to the drupal permissions function (in civicrm.module?)

If you do it that way you could submit it as a patch but if you just remove it you'll need to maintain it yourself going forwards
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

TwoMice

  • I post frequently
  • ***
  • Posts: 214
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
Re: Disabling "add to groups" option on import
September 07, 2010, 01:52:26 pm
Could you do this with hook_civicrm_buildForm()?  I believe this hook fires /after/ the civicrm form is built, so you could simply remove those fields from the form using HTML_QuickForm methods.

http://wiki.civicrm.org/confluence/display/CRMDOC32/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmbuildForm
Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Disabling "add to groups" option on import

This forum was archived on 2017-11-26.