Element.saveGhostText (Method)

Either creates new ghost text or updates existing ghost text. Most of this information describes the renderer used to display this text.

Returns:

Void

Arguments:

Name Type Required Description
elementID ElementTypeID Required An element's ID.
ghostText String_NonNull_NoCFML_255 Required The ghost text to be displayed for the element.
renderingMode GhostTextRenderingMode Required The ghost text's rendering mode: 'Standard' or 'Custom'.
moduleType GhostTextModuleType_EmptyString Optional. Defaults to an empty string. The type of module associated with this ghost text. If the RenderingMode is 'Standard', this value should be an empty string. If the RenderingMode is 'Custom', this value is either 'Existing' or 'Explicit'.
modulePath ModulePath_EmptyString Optional. Defaults to an empty string. The path (including the filename) to the module that will render this element's ghost text. This argument is required if the ModuleType is 'Existing' or 'Explicit'. Use an empty string to indicate that no renderer exists.

Context:

License Requirements None
Permission Requirements site:ManageElements
Deny Context None
Require Context AuthoringEnabled
Author Lock (not required)
Transaction Logging If transaction logging is enabled at the site level, calls to this method will be logged
Customization This method may be customized at the site level

Error Codes:

Code Error Message
15004 A module path is required for custom modules.
15005 A custom module type can only be Existing or Explicit.
15018 The specified element does not support ghost text.

Notes:

None