1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    1
    Vote Rating
    0
    mrbond is on a distinguished road

      0  

    Default Unanswered: How can i add a Custom Component [Message] below the input field ?

    Unanswered: How can i add a Custom Component [Message] below the input field ?


    How can i add a custom component (i created a component called ErrorMessage) below an Input Field to display an error message back to user ?

    This is the pseudo code that i was trying, for now i'm just adding all the error at the end. But i don't see the messages even at the end of panel. Most of the responses in forums are asking to do doLayout, which i guess is from sencha touch 1. How can i refresh the view after adding new components. Also how can i add components in the middle?

    Code:
            
            var form = this.getForm(); // form panel
            var fields = form.getFields(), field; 
            for (name in fields) {
                //console.log('Field Name ' + name);
                if (fields.hasOwnProperty(name)) {
                    field = fields[name];   // do some validation here later.
                    field.getParent().items.add(new App.ErrorMessage(
                            {html: 'test error message.' }
                    ));
                }
            }

  2. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,135
    Answers
    129
    Vote Rating
    99
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      0  

    Default


    I believe you can do this with simple css by adjusting the field's bottom margins and displaying some sort of floating error text below the field. And the view should refresh after adding new components automatically.

Thread Participants: 1

Tags for this Thread

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