contentType

Specifies the type of content in the referenced document, expressed as a MIME type.

Syntax

Reference_Syntax.contentType = "text/plain | application/x-formcalc | Mime-type"

Values

Type

Values

String

The following values are allowed for documents containing text:

  • text/plain (default)

  • application/x-formcalc

  • Any valid MIME-type.

Unadorned text. The application may accept content that does not conform strictly to the requirements of the MIME type.

  • application/x-formcalc

  • Any valid MIME-type.

A FormCalc script.

  • Any valid MIME-type.

Support for other text types, such as text/html as well as scripting types such as application/x-ecmascript is implementation-defined.

When the referenced document is an image, a suitable MIME-type must be supplied for this property to tell the application that the content is an image. However, the application is free to override the supplied value if upon examining the image data it determines that the image data is of a different type. Which image types are supported is implementation-defined.

Version

XFA 2.1

Examples

JavaScript

ImageField1.resolveNode("value.#image").contentType = "application/x-formcalc";

FormCalc

ImageField1.value.#image.contentType = "application/x-formcalc"

// Ethnio survey code removed