Accessing a form

You can access existing forms in a database as follows:

  • The Forms property of NotesDatabase returns an array of NotesForm objects.
  • The GetForm method of NotesDatabase returns a named NotesForm object.

TheNotesFormClass provides access to the following form properties:

Property

Data type

Description

Aliases

Array of strings

(Read-only) Aliases of the form

Fields

Array of strings

(Read-only) Names of all the fields of the form

FormUsers

Array of strings

(Read-write) Contents of the $FormUsers field

HttpURL

String

(Read-only) The HTTP URL of a form.

IsSubform

Boolean

(Read-only) True if the form is a subform

Name

String

(Read-only) Name of the form

NotesURL

String

(Read-only) The Notes® URL of a form.

Parent

NotesDatabase

(Read-only) Database that contains a Form object. For COM only.

ProtectReaders

Boolean

(Read-write) Protects $Readers items from being overwritten by replication

ProtectUsers

Boolean

(Read-write) Protects $FormUsers items from being overwritten by replication

Readers

Array of strings

(Read-write) Contents of the $Readers field

In addition, you can get the type of a field on the form with GetFieldType. See Type in NotesItem for the valid field types. You can remove an existing form from the database with Remove method.