1. #1
    Ext User
    Join Date
    Sep 2007
    Posts
    65
    Vote Rating
    0
    mcohnen is on a distinguished road

      0  

    Default formField, existing input, and validation

    formField, existing input, and validation


    Hi,

    I am trying to use TextField to format and validate an existing input. This is my code:
    Code:
    var formField = new Ext.form.TextField({el:"name", maxLength:5, msgTarget: 'side', autoCreate: false});
                formField.render();
    It works fine, but when validation files, there is a javascript error in the ext in the line with this code
    Code:
    var B=this.el.findParent(".x-form-element",5,true)
    Error is not in this line, but is caused because B is null. Is it mandatory that my form has the class "x-form-element" ?

    What am i doing wrong? Thank you!!!

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    2
    tryanDLS is on a distinguished road

      0  

    Default


    Assuming that that error is coming from Field.markInvalid, then yes 'x-form-element' is required. It's trying to find the parent container so that it can display the validation error message/icon.

    Some of the other field classes can be customized, not sure why that one is hard-coded. Maybe this should be an enhancement.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar