Restrict No of attachment in a RTF

The form is having is having 3 RTF fields and we want to allow attachment of only one file in each field.

I tried the option of @attachmentlengths. But this is on document level and not on field level

How to put the check on field level.

Thanks

Subject: Restrict No of attachment in a RTF.

I don’t think you can through the U.I.

Attachments really are stored at the Document level. The only thing that resides in the RTF is a pointer/Icon to the attachment. Indeed, if you delete the RTF from a document, any attachment the user added to is will still be there, but displayed at the bottom of the form under a horizontal line.

The data for the attachments are stored in the $FILE items of the document.

Subject: RE: Restrict No of attachment in a RTF.

To start with, use a Rich Text Lite field to let them put only attachments there (if that’s what you want).

To make sure there’s only one attachment per field you must use LotusScript. This article has an example of validation of attachments in a rich text field. You can download the sample database (free!) and find the form that does it, which has “validate” in its name.