This topic is locked

Hide Tooltip Based on value of previous field

2/8/2020 9:22:23 PM
PHPRunner General questions
lefty author

I know how to hide a field input control based on a value from another field in Javascript onload , cannot figure out how to hide the tooltip and label for the same scenario.
This Hides the input field
var ctrlfldsales = Runner.getControl(pageid, 'fldsales');

var ctrlfsm_email = Runner.getControl(pageid, 'fsm_email');

var ctrlManager = Runner.getControl(pageid, 'Manager');

var ctrlteam = Runner.getControl(pageid, 'team');

var ctrlflddivision = Runner.getControl(pageid, 'flddivision');

ctrlfldsales.on('change', function(e){

if (this.getValue() == 'SalesRep'){

ctrlfsm_email.show();

ctrlManager.hide();

ctrlteam.show();

ctrlflddivision.show();
}else{
if (this.getValue() == 'FSM') {

ctrlfsm_email.show();

ctrlManager.show();

ctrlteam.show();

ctrlflddivision.show();
} else {
if(this.getValue() == 'Other') {

ctrlfsm_email.hide();

ctrlManager.hide();

ctrlteam.hide();

ctrlflddivision.hide();
}

}
}

}

);
I know pageObj.hidefield works for field and label but when I add it to this code nothing hides.

.

Any Ideas?

A
acpan 2/9/2020

Check the manual for
how_to_display_messages_or_tooltips
It says, use the following to set tooltip:
ctrl.setTooltip( message );
Try setting it to empty.