<div dir="ltr">Thanks for the tips guys.<div><br></div><div>I ended up using uitype 61 and had to modify CRMEntity.php and layouts/v7/modules/Vtiger/uitypes/File.tpl.</div><div>I also added the file modules/ProjectTask/models/Record.php because I needed the field in the ProjectTask module.</div><div><br></div><div>I'm attaching the diff file for anyone interested.</div><div><br></div><div>I have to say: CRMEntity.php is a huge violation of the Open Closed Principle (systems should be closed for modification but open for extension). One should not have to hack into the CRMEntity class to add a new uitype. uitype specific  code should go into uitype specific classes. Ideally, we should be able to add a new uitype without touching existing code.</div><div><br></div><div>Alan, how do you manage to find old threads so easily?  I couldn't find a way to search this thing: <a href="http://lists.vtigercrm.com/pipermail/vtigercrm-developers/">http://lists.vtigercrm.com/pipermail/vtigercrm-developers/</a></div><div>Before, you could use nable: <a href="http://vtiger-crm.2324883.n4.nabble.com/vtigercrm-developers-f4.html">http://vtiger-crm.2324883.n4.nabble.com/vtigercrm-developers-f4.html</a> but it is dead now :(</div><div><br></div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Saludos<div><br></div><div>Rubén</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 21, 2022 at 4:05 AM 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">On 21/01/2022 02:53, Rubén A. Estrada Orozco wrote:<br>
> Hi everyone,<br>
> <br>
> I'm trying to create an  upload field. Like the contact's image field <br>
> but this one should allow for pdfs, doc, xls, etc... not just images. <br>
> The use case is: make file fields mandatory, so that the user has to <br>
> upload something. Currently, with the documents module you can have <br>
> related files, but you cannot make them mandatory.<br>
<br>
I've discussed this before - see thread below. It's not exactly trivial <br>
but not too hard - you'll need to clone some functionality from other <br>
vtiger modules which support file upload.<br>
<br>
<a href="http://lists.vtigercrm.com/pipermail/vtigercrm-developers/2020-February/038421.html" rel="noreferrer" target="_blank">http://lists.vtigercrm.com/pipermail/vtigercrm-developers/2020-February/038421.html</a><br>
<br>
HTH<br>
<br>
Al<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>