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) »
  • I don't want to use the built-in address fields for CiviCRM Contacts
Pages: [1]

Author Topic: I don't want to use the built-in address fields for CiviCRM Contacts  (Read 798 times)

bilvavan

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5.5.8
  • PHP version: 5.3.5
I don't want to use the built-in address fields for CiviCRM Contacts
March 28, 2011, 09:11:14 am
Hi,
I am configuring CiviCRM wherein I don't want to use the built-in address tab provided in Contacts>>New Individual, but want to use a custom field set to store the address information as per my needs. However, when I uncheck the "Address" Pane from Global Settings>Site Preferences>Editing Contacts , save and then try to open the "New Individual" form, it throws me the following error -
QuickForm Error: the rule does not exist as a registered rule

Can anyone help me on this?

-bilvavan

Rahul Bile

  • I post occasionally
  • **
  • Posts: 112
  • Karma: 16
  • impossible says, I M Possible
    • I AM POSSIBLE
Re: I don't want to use the built-in address fields for CiviCRM Contacts
March 28, 2011, 09:28:44 am
bilvavan,

I confirmed this on http://drupal.demo.civicrm.org, can you please create an issue at http://issues.civicrm.org.
Please add the link of this forum post too. That would be helpful.

Rahul.
« Last Edit: March 28, 2011, 09:31:13 am by Rahul Bile »
Consider donating to CiviCRM if you use it. http://civicrm.org/donate

Rahul Bile

  • I post occasionally
  • **
  • Posts: 112
  • Karma: 16
  • impossible says, I M Possible
    • I AM POSSIBLE
Re: I don't want to use the built-in address fields for CiviCRM Contacts
March 28, 2011, 10:08:39 am
Issues Created  http://issues.civicrm.org/jira/browse/CRM-7839 , Good Catch. :)
Below is the patch.

Code: [Select]
Index: CRM/Contact/Form/Contact.php
===================================================================
--- CRM/Contact/Form/Contact.php (revision 33423)
+++ CRM/Contact/Form/Contact.php (working copy)
@@ -564,7 +564,10 @@
  }
         
         $this->addFormRule( array( 'CRM_Contact_Form_Edit_'. $this->_contactType,   'formRule' ), $this->_contactId );
-        $this->addFormRule( array( 'CRM_Contact_Form_Edit_Address',   'formRule' ) );
+     
+ if ( array_key_exists('Address', $this->_editOptions) ) {
+ $this->addFormRule( array( 'CRM_Contact_Form_Edit_Address',   'formRule' ) );
+ }
         
         if ( array_key_exists('CommunicationPreferences', $this->_editOptions) ) {
             $this->addFormRule( array( 'CRM_Contact_Form_Edit_CommunicationPreferences','formRule' ), $this );


HTH

Rahul
« Last Edit: March 28, 2011, 10:29:25 am by Rahul Bile »
Consider donating to CiviCRM if you use it. http://civicrm.org/donate

bilvavan

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5.5.8
  • PHP version: 5.3.5
Re: I don't want to use the built-in address fields for CiviCRM Contacts
March 30, 2011, 03:46:44 am
Thanks for the patch Rahul .

Things working now as expected !!

-Bilvavan

Rahul Bile

  • I post occasionally
  • **
  • Posts: 112
  • Karma: 16
  • impossible says, I M Possible
    • I AM POSSIBLE
Re: I don't want to use the built-in address fields for CiviCRM Contacts
March 31, 2011, 05:25:11 am
Welcome :)
Consider donating to CiviCRM if you use it. http://civicrm.org/donate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • I don't want to use the built-in address fields for CiviCRM Contacts

This forum was archived on 2017-11-26.