Results 1 to 3 of 3

Thread: Scroll to invalid field

  1. #1
    Sencha User
    Join Date
    Jun 2017

    Default Scroll to invalid field

    I have a big form with many fields, I scroll to the invalid field as shown in my code below. But this works only for the fields on top. The code does not scroll if the field was half way the page.

    var mainForm = this.getView();
    mainForm.getForm().getFields().each(function(field, index, length) {    if (!field.isValid()) {
            mainForm.setScrollY(field.getPosition()[1], true);
            return false;
        return true;
    Note: Some fields when I debug in chrome have position both x and y set to zero. I am thinking maybe this is why I can't scroll to them.

  2. #2


    Hi Bbaale,

    make a simple fiddle and describe the expected behaviour if (a. the first invalid field is on top, (b.the first invalid field is out of visibility in the screen, (c..n numerous invalid fields which needs to be processed each..., and so on. Think we can help you after some more explanation.

  3. #3
    Sencha Premium Member
    Join Date
    May 2007
    Sydney, Australia


    Try the scrollIntoView() method eg.


Similar Threads

  1. Replies: 2
    Last Post: 30 Aug 2013, 5:55 AM
  2. Fields in Composite Field Show Scroll Bar When Invalid
    By zacware in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 28 Jun 2010, 10:56 AM
  3. invalid field msgTraget
    By jmoraes in forum Sencha Ext JS Q&A
    Replies: 2
    Last Post: 8 Apr 2010, 3:16 AM
  4. how to scroll to the invalid field in the form?
    By apaa in forum Sencha Ext JS Q&A
    Replies: 3
    Last Post: 6 Aug 2008, 1:31 AM
  5. label is scroll with scrollbar,but the field is not scroll
    By edisundong in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 25 Jan 2008, 3:25 AM

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