<div dir="ltr">You can do this in the Vtiger_Field_Model class under the isAjaxEditable fn. by adding conditions for the UIType.<div><br></div><div>If for a specific module, extend the Vtiger_Field_Model in your module and restrict from there.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 22, 2020 at 6:58 PM Alan Lord <<a href="mailto:alanslists@gmail.com">alanslists@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Following up a bit on this, I'd like to make my new custom field <br>
read-only in Detail View, i.e. disable Ajax Editing.<br>
<br>
However the method isAjaxEditable() exists in the Vtiger_Field_Model <br>
(even though it mostly tests for UITypes), not in the UIType_Model which <br>
seems a bit odd to me and I can't see an easy way to extend/override the <br>
Field_Model class?<br>
<br>
I can do it from the client-side fairly easily but this method just <br>
seems to be in the wrong class to me - by being in the Field_Model it's <br>
suggesting that the function is dependent on the current *Module*, not <br>
the current Field...?<br>
<br>
Cheers<br>
<br>
Al<br>
<br>
<br>
<br>
On 22/06/2020 11:40, Alan Lord wrote:<br>
> I want to add a new UIType field to vtiger 7 that displays an html <br>
> canvas element.<br>
> <br>
> Am I right in thinking I should register it vtiger_ws_fieldtype and if I <br>
> give it a fieldtype of "canvas" then I can extend the Vtiger_Field_Model <br>
> to load it?<br>
> <br>
> One thing I don't quite get is how in Detail Views the UIType template <br>
> file does not seem to be used at all - it only seems to be called for <br>
> Edit Views. So for Detail View do I need to modify the <br>
> DetailViewBlockView.tpl for all/any modules where I might want to use my <br>
> new field?<br>
> <br>
> And in terms of choosing a UIType _number_ how do we prevent possible <br>
> collisions? I can choose something like 995 or whatever, but presumably <br>
> another developer could also choose the same number without knowing?<br>
<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div>