Results 1 to 3 of 3

Thread: Unset Textfield value after data load in Form Panel

  1. #1
    Sencha Premium Member
    Join Date
    Nov 2011
    Location
    Compiegne FRANCE
    Posts
    48

    Default Unset Textfield value after data load in Form Panel

    Dear All,

    The problem seems to be simple, but I can't find any valid solution:
    I have a FormPanel, used for create or update document.
    When it's an update, the FormPanel is build with an URL and get the JSON with all needed informations.
    All it's ok !, perfect ?
    In fact no, in plus, I want to reset value for some fields of my FormPanel. (Update Date, Evolution...).
    I can NOT modify the json answer with only interested fields.

    If I try to add a FormPanel listerner on afterrender, the value of field is set to 'Null', ok, but directly replace by value from json file...
    I try a textField listener on the afterrenderer, same effect...

    So, my questions:
    What is the event (if exist) that correspond to an after load json data on a FormPanel? (Warning, no specific store for my panel, only the url).
    or
    What is the property of textfield to not get the corresponding data when load a json store (always for FormPanel) ?

    Thanks for your help.

  2. #2

    Default

    Something like

    Code:
    myForm.load({
      scope: myForm,
      success: function (form, action) {
        this.items.get(2).setValue('');
        this.items.get(3).reset();
       }
    });

    Enjoy
    Wes

  3. #3
    Sencha Premium Member
    Join Date
    Nov 2011
    Location
    Compiegne FRANCE
    Posts
    48

    Default

    ...
    I'm a little bit confused !!! ;-)
    I'm looked for a long time to have FormPanel well loaded with data from url...
    --> Only because I forget to add the form.load() action.

    And today, I have lost many time because I forget... That there is a form.load() action !!!

    Many thanks, all it's ok now !!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •