pp108 : getFormattedValue()

getFormattedValue()


It formats the value that is stored in the backend, and returns the formatted value to the user. This method is applicable to all controls.

The value in each control will either be the value stored in the backend or in a format understandable by the you. The getValue() method denotes the actual value, whereas the getFormattedValue() method denotes the value that is displayed for the you to see. Both can have similar values.

Syntax

Script ControlID.getFormattedValue()


Return Value


Returns the value in the control.

Example


If a control shows the date field in dd/mm/yyyy format, then for a date of 25/11/2004, the getFormattedValue() method returns 25/11/2004.

Applies to


Input, Password, Output, Code Snippet, Textarea, Check, Select, List