Hi
How can I set a field to disabled. The user shouldnt be able to change the information in that field. It should be able to display information though.
Regards
Andrei
Hi
How can I set a field to disabled. The user shouldnt be able to change the information in that field. It should be able to display information though.
Regards
Andrei
see this thread: http://www.sugarcrm.com/forums/showthread.php?t=73229
Stefan Ulrich Sauer
System Analyst
Devoteam Danet GmbH
Gutenbergstraße 10
D-64331 Weiterstadt
Germany
email: Stefan-Ulrich.Sauer@devoteam.com
http://www.devoteam.de
You can edit the editviewdefs of your module, and the disabled field has to use the customCode attribute, making it display just the field value.
Rafael Queiroz Gonçalves
Advanced OMG UML Certified Professional
Sun Certified Enterprise Architect for the Java Platform
Sun Certified Programmer for the Java 2 Platform
IBM Certified Advanced Application Developer - Lotus Notes and Domino
IBM Certified Application Developer - IBM WebSphere Portlet Factory
Computer Science Mastering / UFSC - PPGCC
I checked that thread but I am not quite sure if there is a solution to what I need.
I get the value for my field from a js file where I calculate the sum of some fields.PHP Code:'FIELD_NAME' => array(
'name' => 'FIELD_NAME',
'customCode' => '
{if $fields.SOME_FIELD.value}
<input type="text" name="FIELD_NAME" value= "{$fields.FIELD_NAME.value}">
{/else}
{$fields.FIELD_NAME.value}
{/if}
'
),
I dont have the time to check the devtoolkit. Looks complicated.
can you tell me what code needs to be put in the customCode attribute to display only the field value?
Thanks
"FIELD_NAME" is the name of your field.PHP Code:'FIELD_NAME' => array(
'name' => 'FIELD_NAME',
'customCode' => '{$fields.FIELD_NAME.value}'
),
Stefan Ulrich Sauer
System Analyst
Devoteam Danet GmbH
Gutenbergstraße 10
D-64331 Weiterstadt
Germany
email: Stefan-Ulrich.Sauer@devoteam.com
http://www.devoteam.de
Another somewhat more upgrade-safe way to do this is to specify the 'disabled' attribute for the field using the displayParams parameter as shown below:
PHP Code:'FIELD_NAME' => array(
'name' => 'FIELD_NAME',
'displayParams' => array('disabled' => 'disabled'))
),
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks