Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: [1.1] form.getValues() && emptyText

  1. #11
    Ext User
    Join Date
    Dec 2007
    Location
    Maida Vale
    Posts
    96
    Vote Rating
    0
      0  

    Default

    A 'sendEmptyText' boolean would be ideal, because I agree with both sides of the arguement.

  2. #12
    Ext User
    Join Date
    Jun 2008
    Posts
    5
    Vote Rating
    0
      0  

  3. #13

  4. #14
    Ext User
    Join Date
    Aug 2009
    Posts
    2
    Vote Rating
    0
      0  

    Default

    My solution:

    Code:
    Ext.onReady(function() {
        Ext.select("form").on('submit', function() {
            Ext.each(Ext.ComponentMgr.all.items, function() {
                if (typeof this.getValue == "undefined" || typeof this.el == "undefined") return;
    
                if (this.getRawValue() != this.el.getValue())
                    this.setRawValue("");
            });
        });
    });

  5. #15
    Sencha User
    Join Date
    Jan 2012
    Posts
    13
    Vote Rating
    0
      0  

    Default

    You may rewrite getValues:add checking what field is empty (by class)end reset value: if ( Ext.get(oneElem).hasClass('x-form-empty-field')) { arrayPairs.push([elemName, '']); }

Page 2 of 2 FirstFirst 12

Posting Permissions

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