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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Unwanted core fields
Pages: [1]

Author Topic: Unwanted core fields  (Read 661 times)

permaculturegeek

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 2
    • Permaculture in New Zealand
  • CiviCRM version: 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Unwanted core fields
March 05, 2014, 10:25:14 pm
Is there any way to get rid of the employer and job title fields from contacts? I mean really get rid of them and not have them in the database rather than going through extra computation in order to hide them as I've seen described. I'm sre they are irrelevant to a good many civi implementations.

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Unwanted core fields
March 06, 2014, 11:28:50 am
Hi there,

The short answer is "no".  There's a few fields like this which you can remove using the display preferences, but that's not currently one of them.  There was some discussion last year at the post-CiviCon sprint about making this easier, but I think at this point it's going to wait until there's a new templating system, and that's still 2-3 releases out.

That said - hiding those fields involves a very minimal amount of extra computation!
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

permaculturegeek

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 2
    • Permaculture in New Zealand
  • CiviCRM version: 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: Unwanted core fields
March 07, 2014, 06:14:35 pm
Thanks.
Alas, my efforts to hide the fields are not working!
I have created a custom templates directory ( /sites/default/files/civicrm/customtemplates/ ) with appropriate permissions and pointed to it in settings (both Directories and Resources panels).

I have modified ../templates/form/ContactInfo.tpl and templates/form/edit/Individual.tpl and uploaded those to my custom template directory, but I am still seeing those fields. I also tried reproducing the forms/edit directory structure within customtemplates/, but that didn't help.

I note that there's a compiled templates directory. Do I need to recompile, and if so, where is the command to do that?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Unwanted core fields
March 08, 2014, 10:43:22 am
You must reproduce the "the forms/edit directory structure within customtemplates" precisely as it is, including capitalization. If that fails, tell us the full directory you are using.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Unwanted core fields
March 09, 2014, 04:44:14 pm
Rather than hiding fields with custom .tpl files that will likely need to be maintained and merged with future versions (CiviCRM releases two major versions per year, and nearly one release per month!) simply use jQuery in your CMS' theme to conceal the hidden fields.  It's much faster and more maintainable.

Example:

Code: [Select]
<script>
cj("div.crm-contact-job_title").closest("div").hide();
</script>
« Last Edit: March 09, 2014, 04:46:34 pm by CiviTeacher.com »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Unwanted core fields
March 10, 2014, 07:43:22 am
Hi CiviTeacher,  that sounds really a good way of hiding them.  Can you tell me more about how to do that, or is that on one of your videos?
Andy Clark

permaculturegeek

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 2
    • Permaculture in New Zealand
  • CiviCRM version: 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: Unwanted core fields
March 11, 2014, 07:13:11 pm
Quote from: Hershel on March 08, 2014, 10:43:22 am
You must reproduce the "the forms/edit directory structure within customtemplates" precisely as it is, including capitalization. If that fails, tell us the full directory you are using.

Thanks, that fixed it :-)

permaculturegeek

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 2
    • Permaculture in New Zealand
  • CiviCRM version: 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: Unwanted core fields
March 11, 2014, 07:17:46 pm
Quote from: CiviTeacher.com on March 09, 2014, 04:44:14 pm
Rather than hiding fields with custom .tpl files that will likely need to be maintained and merged with future versions (CiviCRM releases two major versions per year, and nearly one release per month!) simply use jQuery in your CMS' theme to conceal the hidden fields.  It's much faster and more maintainable.


Given that our CMS theme is a Zen subtheme, our our update issues there are just as complex. I'm pretty sure our selected civiCRM custom template path will be free from interference.
Also, as an old-school web developer, I never assume that javascript will be executed.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Unwanted core fields

This forum was archived on 2017-11-26.