Javascript API: hideField()
Hides the field and field label. hideField() method is available in the JavaScript OnLoad event of the Add/Edit/View/Register pages.
Syntax
pageObj.hideField(field);
Arguments
field - field name. Example: "Make".
Return value
No return value.
Example 1
Hide the Make field:
JavaScript OnLoad event
pageObj.hideField("Make");
Example 2
Show the State field, if Country is USA, or otherwise hide:
var ctrl = Runner.getControl(pageid, "Country");
if(ctrl.getValue() != "USA")
pageObj.hideField("State");
ctrl.on('change', function(){
if (this.getValue() == "USA"){
pageObj.showField("State");
}
else {
});
See also