PDA

View Full Version : Dynamically changing textfield.allowBlank doesnt show/hide red asterisk appropriately



JackJohnsonX
28 Jan 2015, 12:06 PM
hey all,

anyone know how i can show/hide the red asterisk fieldLabel icons for allowBlank:false fields?


I have a textfield which I have configured with allowBlank:true by default.

If a related combobox has a specific value the textfield is mandatory, else its optional.

So i check the value of combo

//combo select handler

handleCountrySelect:function(cbo_){
if(cbo_.getValue() == "blah"){
this.getMyTxtFld().allowBlank = false;
this.getMyTxtFld().validate();//highlights field red and shows tooltip, but doesnt show asterisk
else{
this.getMyTxtFld().allowBlank=true;
}

I set breakpoint in debugger and confirmed the value of allowBlank does change. But the icon still doesnt show.

lumberjack
30 Jan 2015, 7:20 AM
I'd like to test this along with you. Can you please post a test case either inline here or at https://fiddle.sencha.com?

Regards,
Brian