Domino Code Fragment

Code Name*
How to Hide Attachments from Web Clients
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.217.144.32
Description*
Hide V2 style attachments from displaying to web browsers?
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:

When web browser submit documents with attachments, the attachments appear at the bottom of the document. This is referred to as a Notes V2 style attachment. Is it possible to hide these V2 style attachments from displaying to web browsers?


Solution:
Yes, it is possible to hide V2 style attachments from displaying to web browsers. There are two different ways to do this:


1. Use the HTML Tag <noscript> as passthru HTML on the last row of the form. Everything that follows this tag will be hidden from web clients. This works since V2 Style file attachments always appear at the bottom of the document.

For example, on the last row in the design of the form, enter the following tag:


[<noscript>]

NOTE: This tag must be placed inside opening and closing brackets "[" and "]" on the Notes form. The brackets tell Domino to interpret the code in between the brackets as raw HTML code, rather than text.


or

2. In Domino/Notes 4.6 and later, there is an internal field named "$V2AttachmentOptions" that can be added anywhere to the form. If this field has a value of 0 (zero), then all V2 Style file attachments will be hidden from web clients. Notes clients will still be able to see the attachments. The field should be editable Text.

Note: $V2AttachmentOptions works only on Domino 4.6 servers or later. It is ignored on Domino 4.5 servers.