[Vtigercrm-developers] Readonly fields at record-level?

Jonathan Sardo sardoj at gmail.com
Tue Jan 20 22:58:33 GMT 2015


I need to do the same, I think we have to do this using jQuery and
"disable" attribute.

Le mardi 20 janvier 2015, Alan Lord (News) <alanslists at gmail.com> a écrit :

> On 16/01/15 12:51, Alan Lord (News) wrote:
> ...
>
>> To recap, I want to be able to make a bunch of fields (in Accounts, but
>> that's not important) read-only based on the value of another field in
>> the record (a Picklist value as it happens). So this is record level
>> control not module level or user level.
>>
>> Looking at the code, I can see I can override the isEditable() function
>> in the Field model to return false for a given field id.
>>
>> But to get the information regarding the current record's value (that
>> will determine if it should be read-only or not) into the Field model
>> for checking, it looks like I need to pass it into the Block model first
>> via the getFields() function which is called from the {Detail or Edit}
>> Record Structure models...
>>
>> Is there an easier, or more straightforward mechanism to get the
>> *current* record model (or even just a bool value) straight into the
>> Field Model?
>>
>
> Anyone?
>
> Thanks
>
> Al
>
> --
> Libertus Solutions
> http://www.libertus.co.uk
>
> _______________________________________________
> http://www.vtiger.com/
>


-- 

Cordialement,

Jonathan SARDO
[image: Images intégrées 5]
Tél. 06 99 45 50 47
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150120/e4afbb9f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 4223 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150120/e4afbb9f/attachment-0001.png>


More information about the vtigercrm-developers mailing list