I have a grid with a checkbox and two text textfields. I am trying to get both textfields to be required when the checkbox is checked. However, the code below only requires one of the text fields after the checkbox is checked and only the user after the user has clicked on both text fields. Here is my code
onChangeAvailRequestCheckBox:function(){
var availRequestsCheckBox = this.getAvailRequestsCheckBox();
var channelAliasTextField = this.getChannelAliasTextField();
var defaultEmailTextField = this.getDefaultEmailTextField();
if (availRequestsCheckBox.getRawValue() === true) {
channelAliasTextField.allowBlank = false;
defaultEmailTextField.allowBlank = false;
} else {
channelAliasTextField.allowBlank = true;
defaultEmailTextField.allowBlank = true;
}
},
Aucun commentaire:
Enregistrer un commentaire