[Vtigercrm-developers] This shouldn't be so hard!
Joe Bordes
joe at tsolucio.com
Mon Jun 11 14:43:51 PDT 2012
If your problem is with $_FILE comming in empty it is because your form
must have the multi part directive:
ENCTYPE="multipart/form-data"
look at Smary/templates/EditViewHidden.tpl
There isn't much more to it
In some cases I have had to modify CRMEntity, but for what you are
saying you may have enough with the above directive.
Joe
TSolucio
El 11/06/12 21:22, Alan Lord (News) escribió:
> On 11/06/12 19:55, Prasad wrote:
>> Alan,
>>
>> Document attachment is handled like adding Related Record
>> to the module. This provides the ability to re-use existing documents
>> or have more than one attachment for a record.
> OK - But that isn't really what I want. I want a field in a module that
> contains one attachment, a bit like the way the image thing works for
> Products, or the more accurately the image on a Contact for example (UI
> Type 69).
>
>> You can try setting up a relation between your custom module and
>> Document (setRelatedList)
> Well, I have tried this and as I said before. The popup opened and I
> could select a document but on closing/saving that field remains empty
> and nothing is written to the db. (This is using setRelatedModules() not
> setRelatedList().
>
> I refer back to the subject of this message ;-) and to the many others
> on the forums. This really shouldn't be so hard. vtlib is great and
> makes it relatively easy to create new modules, but there is no obvious
> way to create a field to take an attachment or, more specifically an image.
>
> I will examine the code in the Contact module to see if I can understand
> how it is managing to do it although giving it a quick scan, it does
> look essentially the same as in the other modules...
>
> Thanks
>
> Al
>
>
>
More information about the vtigercrm-developers
mailing list