Toggle menu

Text Area - WYSIWYG

This input field lets users enter text across multiple lines. Basic HTML formatting options are provided in a customisable toolbar. This field makes use of the browser's inbuilt rich-text editing.

If using this field to contribute article text via the iCM API, the HTML will automatically get cleaned up and unsupported elements removed when the form is submitted. This is intended to safeguard against poorly generated HTML being saved as article text. There's more information about the rules used when tidying text in the Text Editor Configuration article.

Properties

LabelDescriptionType Name
LabelThe label for this fieldLABEL
Show LabelWhether to show the label for this field or not. This property adds/removes a class on the field's label element. The styling itself is controlled by the site's stylesheetSHOWLABEL
HintAdditional information displayed alongside the field to assist the user in completing it. The value of another field can be used by adding the field's name between # characters. See Common Field Properties for more informationHINT
RequiredWhether or not the field is required to have a value to pass validationREQUIRED
DefaultA default value for the fieldDEFAULT
PlaceholderAny value entered into this property is used as an HTML 5 placeholder. This is a value that will appear in the field but will be cleared when a user enters something in the field. Unlike a default value, it will not be submitted as a value for the field. If a default value is supplied, the placeholder will not be seen unless the user clears the default valuePLACEHOLDER
Error MessageThe error message that will be displayed if this field fails its validationERRMSG
Error Message FunctionA function that can be used to override the default error message. You can return a different message for each error type. The message can include the value of another field can be used by adding the field's name between # characters. See Error Message Functions for more information.

This field has the following error types:
 
  • REQUIRED - the field is required but has been left blank
  • VALIDATIONFUNCTION - the result of a custom validation function failing (validation function can also return custom error types)
ERRMSGFUNC
WidthThe display width of the field. The value matches a CSS class, which actually sets the widthWIDTH
HeightThe height of the field in pixels. Leave blank to set the height to 'auto'HEIGHT
SearchableWhether this field's value should be indexed by the search (the object collection if using the database save action and/or workflow process collection if starting a workflow process).

This property is ignored if an External Type is specified for the form. In this case, the ability to search is determined by the searchable property of the type itself
SEARCHABLE
ControlsA space-separated list of controls to include in the toolbar. The full list is:

bold, italic, underline, strikethrough, subscript, superscript, font, size, style, color, highlight, removeformat, bullets, numbering, outdent, indent, alignleft, center, alignright, justify, undo, redo, rule, image, link, unlink, cut, copy, paste, pastetext, print, source

Use the pipe symbol | to separate controls in the editor toolbar. If you want to allow the user to paste into the field you must include 'pastetext'
CONTROLS
StylesBlock formatting options to be made available in the 'style' toolbar drop-down.

Use the popup editor provided to specify one or more of the following pairs:

Paragraph, p
Code, pre
Heading 1, H1
Heading 2, H2
Heading 3, H3
Heading 4, H4
Heading 5, H5
Heading 6, H6
STYLES
Editor StylesheetAn optional URL of a stylesheet that can be applied to the content. The example below uses this site's default CSS, eg /themes/chill/css/chill.cssCSS
ColoursA space separated list of the colours to be included in the colour popup used by the 'highlight' and 'color' toolbar itemsCOLOURS
FontsA comma separated list of font namesFONTS
Font SizesA comma separated list of numbers to include as font sizesSIZES
Validation FunctionA JavaScript function that can be used to provide custom field validation whenever the field value changes or the form is submitted. This function will be executed client-side, provided JavaScript is enabled in the browser, and repeated server-sideVALFUNC
Default FunctionA JavaScript function that can be used to calculate the default field value. This function is executed server-side when the field HTML is generated and is useful when the DEFAULT property is insufficientDEFFUNC
HandlersA JavaScript function that is executed client-side whenever the page loads, or the field value changes. This function is useful for modifying the values of other fields based on an entered valueHANDLERS
Read OnlyDisplay the field as read onlyREADONLY
Additional Styling ModifierAn optional CSS modifier for the field. See Common Field Properties for an exampleADDITIONALSTYLINGMODIFIER
DocumentationAdd documentation to your field to help explain any complex functionality to future users. You might include information on what the field does and how it relates to other fields on the form. Notes added here are only ever visible in the Forms Designer, they can be searched for, viewed and downloaded from the action panel. See Common Field Properties for an exampleDOCUMENTATION

Share this page

Facebook icon Twitter icon email icon

Print

print icon