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) »
  • Customize Househould form
Pages: [1]

Author Topic: Customize Househould form  (Read 618 times)

werner

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Drupal 6
  • MySQL version: mySQL 5
  • PHP version: php5
Customize Househould form
July 12, 2011, 02:33:11 am
Hi,

is there a way to customize the household form and leave the individual and organisation form as they are.

What I want to do is disable plenty of stuff from households like the Adresse, Communication preferences and some fields from the contact details (like email, phone,...)

I found the following article in the Wiki (http://wiki.civicrm.org/confluence/display/CRMDOC40/Customize+Built-in%2C+Profile%2C+Contribution+and+Event+Registration+Screens) but I had no success with it - is it maybe best just to hide them via CSS?

any help would be awesome
thanks werner

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: Customize Househould form
July 12, 2011, 05:14:19 am

Can you elaborate on "but I had no success with it"

you will need to hide those elements conditionally based on the existence of household fields. Might be easiest to do this via jQuery hide of various div's if u detect that this is a household form (maybe check for existence of an element with id = household_name?)
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

werner

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Drupal 6
  • MySQL version: mySQL 5
  • PHP version: php5
Re: Customize Househould form
July 27, 2011, 07:06:01 am
I found a way to use the Smarty engine with the following code:

{if $contactType  eq 'Household' }
   do whatever
{else}
        make the form for persons and organisations
{/if}

or just

{if $contactType  != 'Household' }
        make the form for persons and organisations
{/if}

used it at civi_customtmpl/CRM/Contact/Form/Edit/Email.tpl

« Last Edit: July 27, 2011, 07:08:41 am by werner »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Customize Househould form

This forum was archived on 2017-11-26.