ファイルアップロードフィールドでボタン名を「参照」から変更できないという奇妙な問題に直面しています。
複数の言語をサポートするには、この機能が必要です。xtype:textfield と入力タイプを「ファイル」として使用しています
この問題の解決にご協力ください。EXTJS 3.4を使用しています
xtype:'textfield'
input type : 'file'
これに使用できる優れた拡張機能があります。3.4の例にあります。
FileUploadField.js ファイルuploadield.css
Ext.onReady(function () {
new Ext.Viewport({
layout: 'fit',
items: [
{
xtype: 'form',
items: [
{
xtype: 'textfield',
fieldLabel: 'Textfield with inputType=file',
inputType: 'file'
},
{
xtype: 'fileuploadfield',
width: 200,
emptyText: 'Select a file',
fieldLabel: 'FileUploadField UX',
name: 'blah-blah',
buttonText: 'Custom Text'
}
],
title: 'Form'
}
]
});
});
<html>
<head>
</head>
<body>
<form>
<input type=text name=file style="width:60px">
<input type=file name=newfile style="display:none">
<input type=button onClick="newfile.click();file.value=newfile.value; " value="import from excel">
</form>
</body>
</html>