sugar-custom-field-type

Create custom SugarCRM field types with PHP, JavaScript, and Handlebars templates.

6|3|Updated Oct 27, 2025
One-click install
npx skills add https://github.com/sugarcrm-developers/ai-for-sugar-devs --skill sugar-custom-field-type
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sugar-custom-field-type
Source: https://github.com/sugarcrm-developers/ai-for-sugar-devs/tree/main/skills/sugar-custom-field-type
Command: npx skills add https://github.com/sugarcrm-developers/ai-for-sugar-devs --skill sugar-custom-field-type

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires SugarFieldBase, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the need for creating sophisticated field types in SugarCRM that offer more advanced rendering and interactivity beyond standard options.

Core Features & Use Cases

  • Custom Rendering: Offers custom JavaScript views and Handlebars templates for a field type.
  • Enhanced User Interaction: Provides fields with interactive elements such as color pickers or sliders.
  • SugarFieldBase Extension: Utilizes SugarFieldBase to extend functionality, ideal for non-varchar/text fields.
  • Vardef Configuration: Uses custom vardef configurations for the field type.
  • Use Case: Create a custom 'color picker' field that not only allows selection of colors but also interacts with the UI to update other elements based on the chosen color.

Quick Start

Use the sugar-custom-field-type skill to add a 'color picker' field to your SugarCRM module by executing the skill and specifying the module name.

Frequently Asked Questions about sugar-custom-field-type

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a custom field type in SugarCRM with interactive rendering?

You create a custom SugarCRM field type by defining a PHP class, Backbone view, and Handlebars template, then configuring vardefs. This combination enables interactive rendering like color pickers or sliders beyond standard field options.

When do I need to build a custom SugarCRM field type instead of using standard vardefs?

You need a custom SugarCRM field type when your data requires extensive user interaction or custom styling that standard vardefs cannot handle, such as a color picker that updates other UI elements dynamically based on selection.

Does the SugarCRM Extension Framework support custom JavaScript views for field types?

Yes, the SugarCRM Extension Framework supports custom JavaScript views. You can extend SugarFieldBase to implement custom Backbone views and Handlebars templates for rendering interactive field types within your modules.

What's the best way to add a color picker field to a SugarCRM module?

The best way to add a color picker field in SugarCRM is to create a custom field type using PHP and JavaScript. By extending SugarFieldBase, you can build a Backbone view and Handlebars template that handles color selection and UI interaction.

Can I use custom Handlebars templates for non-varchar fields in SugarCRM?

Yes, custom Handlebars templates work for non-varchar fields in SugarCRM. By extending SugarFieldBase through the Extension Framework, you can define custom rendering logic and interactive elements for complex field types.

What files are required to define a custom field type in SugarCRM?

Defining a custom field type in SugarCRM requires a custom_field_type PHP class, a Backbone view for JavaScript logic, Handlebars templates for rendering, and vardef configuration to map the field structure correctly.