1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    7
    Vote Rating
    0
    Answers
    1
    onecool is on a distinguished road

      0  

    Default Answered: Get form field by name

    Answered: Get form field by name


    Hi all,

    How Can I get a form field by name and compare it with a string ?

  2. Its also a solution of the problem.... Thank you mitchel

  3. #2
    Sencha User
    Join Date
    Mar 2012
    Posts
    103
    Vote Rating
    0
    Answers
    4
    izak18 is on a distinguished road

      -1  

    Default


    You can set a "id" to the form and call it by his id, somethig like this:

    Code:
    var instalacionFormView = new Ext.form.FormPanel({    
    id: 'instalacionFormView',
    fullscreen: true,
    scroll: 'vertical',
    items: []....
    Good luck.

  4. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    7
    Vote Rating
    0
    Answers
    1
    onecool is on a distinguished road

      0  

    Default


    Thks u Izak for replying, i found the solution by usinf getValue method of the form field

  5. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,582
    Vote Rating
    433
    Answers
    3102
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Would not use id, very constricting

    I see you got your answer which is great. I would like to offer another way if you needed the field instance:

    Code:
    formpanel.down('field[name=FieldName]')
    Where FieldName is the name of your field.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  6. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    7
    Vote Rating
    0
    Answers
    1
    onecool is on a distinguished road

      0  

    Default


    Its also a solution of the problem.... Thank you mitchel