HOWTO: Adding HTML attributes to the input fields on EditViews

sugarcrmdevelopers —  February 10, 2011 — 1 Comment

We use a metadata model for most of the EditViews in the product, where the fields displayed and the layout is controlled by a definition file. This makes it quite easy to alter the views without having to dig into HTML code ( you can read more about how these metadata files work here ).

One question came up on the forums, where a user was trying to add additional HTML attributes to the input element for the given field. This is relatively simple to do; you can use the ‘field’ attribute of the ‘displayParams’ attribute to specify what HTML attributes to add to the input element as shown below.

This would output an input element like this:

Trackbacks and Pingbacks:

  1. Tweets that mention Sugar Developer Blog » Blog Archive » HOWTO: Adding HTML attributes to the input fields on EditViews -- Topsy.com - February 12, 2011

    […] This post was mentioned on Twitter by Alex Hall, sugarcrmdev. sugarcrmdev said: HOWTO: Adding HTML attributes to the input fields on EditViews http://developers.sugarcrm.com/wordpress/?p=1842 #sugarcrm […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s