[Vtigercrm-developers] Create file/attachment field

Prasad prasad at vtiger.com
Sat Jan 22 08:22:19 GMT 2022


Please log the enhancement request on code.vtiger.com tracker - we will
review with our core design change.

On Sat, Jan 22, 2022 at 8:13 AM Rubén A. Estrada Orozco <rulotec1 at gmail.com>
wrote:

> Thanks for the tips guys.
>
> I ended up using uitype 61 and had to modify CRMEntity.php
> and layouts/v7/modules/Vtiger/uitypes/File.tpl.
> I also added the file modules/ProjectTask/models/Record.php because I
> needed the field in the ProjectTask module.
>
> I'm attaching the diff file for anyone interested.
>
> 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.
>
> Alan, how do you manage to find old threads so easily?  I couldn't find a
> way to search this thing:
> http://lists.vtigercrm.com/pipermail/vtigercrm-developers/
> Before, you could use nable:
> http://vtiger-crm.2324883.n4.nabble.com/vtigercrm-developers-f4.html but
> it is dead now :(
>
>
> Saludos
>
> Rubén
>
>
> On Fri, Jan 21, 2022 at 4:05 AM Alan Lord <alanslists at gmail.com> wrote:
>
>> On 21/01/2022 02:53, Rubén A. Estrada Orozco wrote:
>> > Hi everyone,
>> >
>> > I'm trying to create an  upload field. Like the contact's image field
>> > but this one should allow for pdfs, doc, xls, etc... not just images.
>> > The use case is: make file fields mandatory, so that the user has to
>> > upload something. Currently, with the documents module you can have
>> > related files, but you cannot make them mandatory.
>>
>> I've discussed this before - see thread below. It's not exactly trivial
>> but not too hard - you'll need to clone some functionality from other
>> vtiger modules which support file upload.
>>
>>
>> http://lists.vtigercrm.com/pipermail/vtigercrm-developers/2020-February/038421.html
>>
>> HTH
>>
>> Al
>>
>> _______________________________________________
>> http://www.vtiger.com/
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220122/84bd4bad/attachment-0001.html>


More information about the vtigercrm-developers mailing list