Hi Grant,
Thanks for the info on this issue!
Sorry for not getting back to this sooner, but I’m back looking at this issue now and only really have one main question that’s still bugging me.
Note: I was only using the fact that I could overwrite the ObjectAttachment field as a workaround to the fact that the CollectionObjectAttachment view definition wasn’t functioning as expected.
I think in an ideal situation there wouldn’t need to be any use of ObjectAttachment at all, but it worked as an okay way to get both the “Choose a file or drag it here” prompt to come up and also have the custom fields we want in the attachment view - unfortunately this workaround of creating an ObjectAttachment form at the Attachment level to supercede the default one breaks our existing Specify 6 process (which we don’t expect to support much longer, but can’t go around breaking core functionality in either (unfortunately for me.))
Ignoring the object attachment and lower level attachment form stuff, can you see any reason why our CollectionObjectAttachment view definition (CollectionObjectAttachmentBRI in this case) doesn’t have the prompt to “Choose a file or drag it here”?
(Apologies for the repeat of the same information that’s in the above messages - I’m trying to lay it out as clearly as I can
)
On the CollectionObject form it is called like this:
<cell type="subview" id="attachments" viewname="CollectionObjectAttachmentBRI" name="collectionObjectAttachments" initialize="align=right;btn=true"/>
and on the CollectionObjectAttachment view definition it looks like this:
<viewdef>
<desc>The CollectionObjectAttachment form.</desc>
<!--columnDef>110px,2dlu,p:g,5dlu,100px,2dlu,85px</columnDef> -->
<columnDef>110px,5dlu,p:g</columnDef>
<rowDef auto="true" cell="p" sep="2px"/>
<rows>
<row>
<cell type="label" labelfor="1"/>
<cell type="field" id="1" name="attachment.origFilename" initialize="editoncreate=true" cols="30" uitype="browse" isrequired="true"/>
</row>
<row>
<cell type="label" labelfor="title"/>
<cell type="field" id="title" name="attachment.title" uitype="text" cols="30"/>
</row>
<row>
<cell type="label" labelfor="subject"/>
<cell type="field" id="subject" name="attachment.remarks" uitype="text" cols="30"/>
</row>
<row>
<cell type="label" labelfor="dateImaged"/>
<cell type="field" id="dateImaged" name="attachment.dateImaged" uitype="text"/>
</row>
<row>
<cell type="label" labelfor="copyrightHolder"/>
<cell type="field" id="copyrightHolder" name="attachment.copyrightHolder" uitype="text"/>
</row>
<row>
<cell type="label" labelfor="copyrightDate"/>
<cell type="field" id="copyrightDate" name="attachment.copyrightDate" uitype="text"/>
</row>
<row>
<cell type="label" labelfor="license"/>
<cell type="field" id="license" name="attachment.license" uitype="text"/>
</row>
<row>
<cell type="label" labelfor="credit"/>
<cell type="field" id="credit" name="attachment.credit" uitype="text"/>
</row>
<row>
<cell type="label" labelfor="eDocs"/>
<cell type="field" id="eDocs" name="attachment.metadataText" uitype="text"/>
</row>
<row>
<cell type="subview" id="imageatt" viewname="AttachmentImageAttributeBRI" name="attachment.attachmentImageAttribute" colspan="3"/>
</row>
<row>
<cell type="label" labelfor="Comments"/>
<cell type="field" id="Comments" name="remarks" uitype="textareabrief" rows="3"/>
</row>
</rows>
</viewdef>
I feel like there should be something that should be some way to trigger this form to come up with the “Choose a file or drag it here” picker without resorting to changing any of the underlying code or replacing it with the ObjectAttachment form/a frankenstein’d version of it.
I should note that this exact same format and issue occurs with our ConservEventAttachmentBRI, LocalityAttachmentBRI, AgentAttachmentBRI, CollectingEventAttachmentBRI, LoanAttachmentBRI and a couple other forms - most of these I’ve just opted not to use our custom forms for and are just the default (non-edited) ObjectAttachment form on PROD, but that does mean we miss the functionality of being able to add any attachment info other than the default fields of Filename, Title and MakePublic
Let me know if there’s anything missing or anything else you’d like from me.
Once again, thanks for all the help on this - I really appreciate it.
Best regards,
Leo