i’m using the upload control to attach files. i’d like to format (via CSS or otherwise) the “Mark attachments for deletion” and the file name to fit with my overall styling.
does anyone have thoughts/example code on how to do this?
i’m using the upload control to attach files. i’d like to format (via CSS or otherwise) the “Mark attachments for deletion” and the file name to fit with my overall styling.
does anyone have thoughts/example code on how to do this?
Subject: Formatting attachment information in Web app
This is a simple code for showing all attachments of a document with your own css style.
It also shows the size of the attachments and the remove checkboxes if the form is in edit mode.
By the way it replaces spaces and bad letters for a direct downlaod access or a picture showing.
You only have tho get this code in a
passthru computed text
in your form.
Here you can see a screenshot sample of this code: (use open in new window)
http://www.datenbanken24.de/db24control/db24manual.nsf/direct?OpenForm&helpkey=Form-Att
@If(
@Attachments < 1;
@Return("");
""
);
_AttachmentNames0 := @AttachmentNames;
_AttachmentNames :=
@If(
@IsError( _AttachmentNames0 );
"NoAttachments";
_AttachmentNames0
);
_AL :=
@If(
@IsNumber( @AttachmentLengths ) & ! @IsError( @AttachmentLengths );
@AttachmentLengths;
0
);
_LabelWidth := “150” ;
_RemoveCheckbox :=
@If(
@IsDocBeingEdited;
(“<td width="100" CLASS="contentCell">” +
“<input type="checkbox" name="%%Detach" value="” + _AttachmentNames + “">”+
" " + “Remove”);
“”
);
“<table border="0">” +
“” +
@Implode(
"<td width=\"" + _LabelWidth + "\" CLASS=\"labelCell\">" +
“” + “FileAttachment” + “:” + “<td width="200" CLASS="contentCell">” +
“<a href="” + @Text(@DocumentUniqueID) + “/$FILE/” +
@ReplaceSubstring(
_AttachmentNames;
( " " : "\"" : "&" : "|" : "(" : ")" : "ü" : "ä" : "ö" : "ß" : "?" : ":" : "Ä" : "Ö" : "Ü" : "," : "\'" ) ;
( "%20" : "%22" : "%20AND%20" : "%20OR%20" : "%28" : "%29" : "%FC" : "%E4" : "%F6" : "%DF" : "%3F" : "%3A" : "%C4" : "%D6" : "%DC" : "%2C" : "%27" )
) +
"" target=ShowAttachment > "+ _AttachmentNames + “” +
“<td width="100" align="right" CLASS="contentCell">” +
@Text(@Round(_AL / 1024)) + " (Kbytes) " +
_RemoveCheckbox +
“”
; “”) +
“” +
“”
Subject: RE: Formatting attachment information in Web app
Thanks! The code works well. I’ll likely change it a little to please my customer but that should be relatively easy.
One other question, since the attachment is made from a browser, do you move the attachment to a RT field or do you hide the default way Domino displays the attachment at the end of a form?
Subject: RE: Formatting attachment information in Web app
No, we don’t transfer it to a rt field.
Only use a field called:
“$V2AttachmentOptions”
text, computed for display, hidden
with the value “0”
to your web form
and so Domino don’t shows the attachments itself
Subject: Neat!!!
Thanks Uwe, I needed that bit o’ code also.
The Datenbanken website has a really neat menu too, I like the little arrow! How did you get that?