Contents

 
Home
PHPRunner 8.0 manual
Prev Page Next Page
 
 

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:

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

Converted from CHM to HTML with chm2web Standard 2.85 (unicode)