1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    12
    Vote Rating
    0
    sonaljain is on a distinguished road

      0  

    Default How to save form values to store

    How to save form values to store


    Hi,

    I have a form panel with some text fields and a button. I want to submit my form values to the local store when user clicks on the button. I was wondering if someone can tell me steps to achieve this then that would be great.

    I would appreciate any help.
    Thanks in advance!
    Sonal

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,445
    Vote Rating
    129
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Assuming you have a reference within the form and you have access to the store...

    Code:
    var values = this.getValues();
    store.add(values)
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    12
    Vote Rating
    0
    sonaljain is on a distinguished road

      0  

    Default


    Thanks for the response. I am getting following error: Object [object Object] has no method 'getValues'

    Also I am new to sencha framework and this is my first form. I am not sure if I should use button handler or controller. If you can provide more details then that would be great.

    Thanks,
    Sonal

Thread Participants: 1