Results 1 to 2 of 2

Thread: Dynamically changing textfield.allowBlank doesnt show/hide red asterisk appropriately

  1. #1
    Sencha User
    Join Date
    Nov 2014
    Posts
    53
    Answers
    4

    Default Dynamically changing textfield.allowBlank doesnt show/hide red asterisk appropriately

    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
    Code:
    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.

  2. #2
    Sencha Premium User lumberjack's Avatar
    Join Date
    Nov 2014
    Location
    Kansas
    Posts
    781
    Answers
    102

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •