Add a custom field

Overview

All BrowserCRM fields are dynamic. They are customizable using the Module Editor (go to Settings | Module Editor).

Note: the People and Companies module share fields (addresses, phones etc) and these common fields are controlled in the Contact Records module. (This is labelled All Entities in some versions).

Backup and Restore of fields

If you are doing extensive customization you may want to keep a backup of the field definitions at each stage.

At database level, the definitions are stored in two tables:

SystemDataDefinition__fields
SystemDataDefinition__data_options

Keep a backup copy of these 2 tables using any database tool in case you need to revert.

If you don't have a backup and need to reinstall the master data for these two tables, look in the file /setup/sql/structure/db_structure.sql for the following sql statements:

#find and run INSERT statements of the format:
INSERT INTO `SystemDataDefinition__fields` ...
INSERT INTO `SystemDataDefinition__data_options` ...

An equivalent way to accomplish this is to create a new installation and copy the 2 tables to your original installation.

Other examples

Forum links:

Add a text field

Click Settings | Module Editor for the module you wish to alter.

Click on Edit for the table you want to customize. Usually [module]_ _item

From the fields list view, click on New to add a new field

Select the type of field you want

Complete the details for the field.

The **name** must be a MySQL safe field name: lower case, no spaces or unusual characters is recommended
Usually just **name** and **label** are required.

Add a dropdown field

Adding a dropdown field is similar to above except that you need to also create the dropdown table.

Click Settings | Module Editor for the module you wish to alter.

To create the dropdown table click on New Dropdown Table and enter a name for the new table.

Once the table is created you click New to add new values. (You can also add values later.)

Enter the name for the new value. The order value determines the display order for the dropdown list.

Back to the Module Editor, click on Edit for the table you want to add the dropdown field to. Usually [module]_ _item

From the fields list view, click on New to add a new field

Select the type of field you want

Select which dropdown table to use

Complete the details for the field.

The **name** must be a MySQL safe field name: lower case, no spaces or unusual characters is recommended
For BrowserCRM, we recommend naming fields with the suffix '_id' for dropdown fields
Usually just **name** and **label** are required.

 
add_a_custom_field.txt · Last modified: 2010/05/17 23:07 by 203.97.219.50
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki