[Vtigercrm-developers] Create file/attachment field

Rubén A. Estrada Orozco rulotec1 at gmail.com
Fri Jan 21 03:07:26 GMT 2022


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220120/31748376/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/31748376/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/31748376/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/31748376/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/31748376/attachment-0007.png>


More information about the vtigercrm-developers mailing list