[CLOSED] Form Initialization in 2.x not woking

  1. #1

    [CLOSED] Form Initialization in 2.x not woking

    Hello

    The below code to initiaze the form works fine in 1.x bit not in 2.x version.

    var initFields = function(form) {
    form.getForm().items.each(function(f) {
    if (f.isFormField || f.isDirty()) {
    f.originalValue = f.getValue();
    }
    }
    );
    Advise..
    Last edited by Baidaly; Dec 30, 2013 at 8:43 PM. Reason: [CLOSED]
  2. #2
    When you stepped through the code, where did it fail?

    I believe .isFormField was removed in Ext JS 4, so that might be the problem.
    Geoffrey McGill
    Founder
  3. #3
    well,
    form.getForm().items
    is not valid.
    it should be
    form.getForm().getFields().items.forEach
    here is the complete working code
    var initFields = function(form) {
         form.getForm().getFields().items.forEach(function(f) {
         if (f.isFormField || f.isDirty()) {
              f.originalValue = f.getValue();
         }
       });
    }
  4. #4
    Hello!

    Can you clarify, did you solve this problem?
  5. #5
    Quote Originally Posted by Baidaly View Post
    Hello!

    Can you clarify, did you solve this problem?
    Yes, problem is solved, please close the request.

Similar Threads

  1. [CLOSED] The Ext.NET initialization script was not found.
    By romeu in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Nov 26, 2012, 10:58 AM
  2. Resource Handler / Ext.NET initialization
    By Justin_Wignall in forum 1.x Help
    Replies: 0
    Last Post: Jul 27, 2012, 8:30 AM
  3. [CLOSED] The Ext.NET initialization script was not found
    By Stefanaccio in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: May 19, 2011, 1:57 PM
  4. Replies: 2
    Last Post: Aug 24, 2010, 11:31 PM
  5. [CLOSED] [1.0] DisplayField Value initialization
    By smmille1 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 15, 2010, 11:31 PM

Posting Permissions