1. #1
    Sencha User
    Join Date
    Dec 2008
    Posts
    73
    Vote Rating
    0
    cdeguzman is on a distinguished road

      0  

    Default Textfield with inputType = file CSS

    Textfield with inputType = file CSS


    Hi, I noticed that if I create a textfield in this manner:

    Code:
    ..., {
            xtype : 'textfield',
            inputType : 'file'
            id : 'fileUploadField'
    }
    The resulting textfield and browse button are not CSS-formatted and look significantly different from other Extjs buttons / text fields. Does anyone know how to apply them look like the standard extjs components?

    Thanks a lot!

  2. #2
    Sencha User
    Join Date
    Dec 2008
    Posts
    73
    Vote Rating
    0
    cdeguzman is on a distinguished road

      0  

    Default


    No one? Can I at least know if this is a bug, and if there are any workarounds for it?
    Last edited by tryanDLS; 6 Feb 2009 at 8:43 AM. Reason: Moved to correct forum

  3. #3
    Sencha User carol.ext's Avatar
    Join Date
    Jun 2007
    Location
    Littleton, Colorado, USA
    Posts
    698
    Vote Rating
    28
    carol.ext has a spectacular aura about carol.ext has a spectacular aura about

      0  

    Default


    Take a look at the File upload example available from the Ext JS Samples page.

    The custom component js and css (! don't miss the required css !) is available in the examples directory of the standard download of 2.2/2.2.1.

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Quote Originally Posted by cdeguzman View Post
    Hi, I noticed that if I create a textfield in this manner:

    Code:
    ..., {
            xtype : 'textfield',
            inputType : 'file'
            id : 'fileUploadField'
    }
    The resulting textfield and browse button are not CSS-formatted and look significantly different from other Extjs buttons / text fields. Does anyone know how to apply them look like the standard extjs components?

    Thanks a lot!
    AFAIK, it's a security feature imposed by the browser. You don't want "disguised" file inputs stealing files from your disk because they look like something else.

Thread Participants: 2