Results 1 to 2 of 2

Thread: Highlight mandatory fields(text boxes) in red color

  1. #1

    Default Highlight mandatory fields(text boxes) in red color

    I need to highlight the mandatory fields (text boxes basically) in red color like in the given image below,
    Expected behavior: When the field is empty, it should be highlighted in red color.
    I have set allowBlank field to false and applied a css class to invalidCls property. Its working as expected when I clear the textbox after loading some data. But when I load the application or refresh the page it does not work. Without loading a value to the textbox even if I clear it, it does not work. The only way I can do it is by focusing the cursor to it. But there are multiple mandatory fields, I can not focus all of them together.
    Can anyone give a solution for this problem?


  2. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Boise, ID


    After the form is rendered you can do an isValid() check on the form and that will highlight any invalid fields.

Tags for this Thread

Posting Permissions

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