Results 1 to 3 of 3

Thread: textfield formatting

  1. #1
    Sencha User
    Join Date
    Jul 2009
    Posts
    32

    Default textfield formatting

    Hi all,

    I'm trying to figure out if it's possible to format a textfield's contents while using the getForm().load method that loads data into my form fields.

    Anyone have a solution?

    best regards,
    avsomeren

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Do you mean preprocess the values before loading them into the form?

    I agree that this is a very common requirement, and I have been bothering the dev team for a couple of years to add a new event so we can get in there easily.

    I use this to add a beforesetvalues event to BasicForm

    Code:
    Ext.override(Ext.form.BasicForm, {
        setValues: Ext.form.BasicForm.prototype.setValues.createInterceptor(function(values){
            return this.fireEvent('beforesetvalues, this, values);
        });
    });
    Why they don't add it I do not know.

  3. #3
    Sencha User
    Join Date
    Jul 2009
    Posts
    32

    Default

    This is brilliant, i could have thought of this myself... But since Ext provides soo many functionalities, sometimes you can't see the forest through the trees

    Thank you for helping me out again, and for providing great support for the community.

Posting Permissions

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