[Vtigercrm-developers] Create file/attachment field

Alexander Allen alexander.allenz at gmail.com
Fri Jan 21 04:37:38 GMT 2022


Hola Ruben. Yo lo he hecho en un par de ocasiones perp no lo tdngo
documentado. Si gustas hacemos una llamada para mostrarte lo que hice y te
comparto los archivos para lograrlo.

El jue., 20 de enero de 2022 9:10 p. m., Rubén A. Estrada Orozco <
rulotec1 at gmail.com> escribió:

> Sorry, there was a mistake in my previous email in the second approach.
> The files DO get uploaded.
> But in the detailview, the field value appears like this:
>
> [image: image.png]
>
> Just two dashes --
>
>
>
> Saludos
>
> Rubén
>
>
> On Thu, Jan 20, 2022 at 8:53 PM Rubén A. Estrada Orozco <
> rulotec1 at gmail.com> 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 tried 2 approaches
>>
>> 1) Simply add a relation field linked to the documents module. After
>> adding the field, it looks like so:
>>
>> [image: image.png]
>>
>> But only the lookup button works. The add button doesn't do anything.
>> What I would like is that this modal would show up:
>>
>> [image: image.png]
>>
>> 2) I've previously managed to add an image field (uitype 69) like so:
>> https://code.vtiger.com/vtiger/vtigercrm/issues/1635
>>
>> So I tried using uitypes 28 and 61 to be able to upload other files
>> different from images. None of them seem to work.
>> A button like this is displayed in the edit view:
>> [image: image.png]
>> But the files do not get uploaded.
>>
>> If someone has any tips or solutions so I don't have to spend a lot
>> of time on this, please let me know.
>>
>>
>> Saludos
>>
>> Rubén
>>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220120/c030a98e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 3298 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220120/c030a98e/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 39047 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220120/c030a98e/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 3344 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220120/c030a98e/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 513 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220120/c030a98e/attachment-0007.png>


More information about the vtigercrm-developers mailing list