Show/Hide Toolbars

PHPRunner 9.8 Manual

Navigation: Advanced topics > Programming topics > Javascript API > RunnerPage object > Methods

PHPrunner32x32     PHPRunner manual


Javascript API: hideField()

Scroll Prev Next More

 

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:

JavaScript OnLoad event

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 {

   pageObj.hideField("State");

}  

});

See also

JavaScript API: showField()

Method: showField()

Method: hideField()