W-Systems joins SugarCRM! Read Blog
We love the freedom to create with Sugar 7. In this article we are sharing a custom module for Sugar that creates a new field type. For developers, this will serve as an example of how to deploy something completely new into Sugar. For Sugar administrators, this is a tool you can download and use right away.
This loadable module creates a new field type that allows you to format specific text on a record view to make it more noticeable to the reader. For instance,= if you want to bring special instructions or alerts to the record reader you may want to increase the text font size, change the font color or font background.
When you load this module and afterwards use the Sugar studio tool to create a new field, you will notice a new “Notification Text” field type. This field type behaves like a Text Field, but adds formatting options for Font Family, Font Size, Font Color, Background Color, Font Weight and Alignment. In addition it allows the field to be a read only field, to suppress any field label and also to optionally stretch the field over a single or multiple columns in the layout.
Use cases for the field is to:
Take a look at the results, it certainly brings information to the attention of the record viewer!
For developers who would like to learn more about how to create new fields in Sugar it is a good idea to study the contents of our loadable module. The zip file consists of the files shown below.
The main definitions of the new field is in the TemplateNotificationText.php file and the notificationtext.js files shown below
For additional details and examples of custom field types in Sugar make sure you study the SugarCRM developer documentation writings Vardef Extensions.