Makes the control readonly.
Syntax
ctrl.makeReadonly();
Arguments
No arguments.
Return value
No return value.
Example
Make the control readonly using the JavaScript OnLoad event:
var ctrl = Runner.getControl(pageid, 'Make');
ctrl.makeReadonly();
Remarks
Note: Readonly controls are submitted with the form and saved in the database. Readonly controls will be filled by the Autofill feature. You can apply default values to Readonly controls.
Making a control readonly is not a security measure, it is simply a UI feature. If you need to prevent these fields from being saved, use this code in Before record added/Before record updated events:
unset( $values['FieldName'] );
See also:
•JavaScript API: Control object > getControl()
•JavaScript API: Control object > isReadonly()
•JavaScript API: Control object > makeReadWrite()
•JavaScript API: Control object > reset()
•JavaScript API: Control object > getValue()
•JavaScript API: Control object