Enable and Disable
The deluge disable keyword is used in on user input field
action script and on load form action script to disable form fields,
when not required to be edited by the user. The field will be available
for viewing to both the owner of the application and to people with whom
you are sharing the application, but cannot be edited. The enable
keyword is used to enable a field for editing, that was previously disabled.
Syntax
enable <field name>; disable <field name>;
|
Example
In the following sample code, the date field is set with zoho.currentdate
in the on load script and disabled from being edited by the user.
form New_Contact { displayname = "New Contact" Name ( type = text )
Email_Address ( displayname = "Email Address" type = email )
Contact_Number ( displayname = "Contact Number" type = number width = 20 )
Register_Date ( displayname = "Register Date" type = date )
on add { on load { input.Register_Date = zoho.currentdate; disable Register_Date; } }
}
|
The Register Date field is set with the current date and disabled in
the New Contact form, as shown in the screen-shot given below: