I've searched the docs and forums but have not found an answer I was hoping you could help with.
I'd like all TextItems to default to characterCasing: 'upper'. I tried setting the defaults on the type as follows:
isc.TextItem.addProperties({
browserSpellCheck: false,
maskPromptChar: "",
characterCasing: 'upper'
});
This works, but it causes problems for a ComboBoxItems with filterLocally: true and addUnknownValues:false. When entering search text into a ComboBox after setting the above, the combobox appears to throw out all entered text except the last character entered. This is in Firefox developer v80.0b and in MS Edge. As an example, replace the js code on your masked edit sample page (https://www.smartclient.com/smartcli...maskedTextItem) with this:
isc.TextItem.addProperties({
browserSpellCheck: false,
maskPromptChar: "",
characterCasing: 'upper'
});
isc.DynamicForm.create({
ID: "contactForm",
width: 400,
wrapHintText: false,
fields: [
{ name: "firstName", title: "First name", editorType: "TextItem",
hint: "<nobr>>?<??????????????</nobr>"},
{ name: "lastName", title: "Last name", editorType: "TextItem",
hint: "<nobr>>?<??????????????</nobr>"},
{ name: "state", title: "State", editorType: "ComboBoxItem",
valueMap: {'AL':'Alabama','AR':'Arkansas','AK':'Alaska','FL':'Florida','LA':'Louisiana'},
filterLocally: true, addUnknownValues: false},
{ name: "phoneNo", title: "Phone No.", editorType: "TextItem",
mask: "##########", hint: "(###) ###-####", showHintInField: true},
{ name: "dateItem", title: "Date", editorType: "DateItem",
useTextField: true, useMask: true},
{ name: "dateTimeItem", title: "Date Time", editorType: "DateTimeItem",
useTextField: true, useMask: true},
{ name: "timeItem", title: "Time", editorType: "TimeItem",
useMask: true}
]
});
Viewing the above, when you type, say 'AL' into the state field, only 'L' shows up and the search goes to Louisiana instead of Alabama.
a) is there a better way to default all text input fields to uppercase (with the ability to override on individual components)?
b) can I create a custom version of TextItem (with characterCasing as desired) and make that the default editorType for all text fields?
c) is this a bug related to this setting (and since ComboBoxItem is based on TextItem)?
Thank you.
I'd like all TextItems to default to characterCasing: 'upper'. I tried setting the defaults on the type as follows:
isc.TextItem.addProperties({
browserSpellCheck: false,
maskPromptChar: "",
characterCasing: 'upper'
});
This works, but it causes problems for a ComboBoxItems with filterLocally: true and addUnknownValues:false. When entering search text into a ComboBox after setting the above, the combobox appears to throw out all entered text except the last character entered. This is in Firefox developer v80.0b and in MS Edge. As an example, replace the js code on your masked edit sample page (https://www.smartclient.com/smartcli...maskedTextItem) with this:
isc.TextItem.addProperties({
browserSpellCheck: false,
maskPromptChar: "",
characterCasing: 'upper'
});
isc.DynamicForm.create({
ID: "contactForm",
width: 400,
wrapHintText: false,
fields: [
{ name: "firstName", title: "First name", editorType: "TextItem",
hint: "<nobr>>?<??????????????</nobr>"},
{ name: "lastName", title: "Last name", editorType: "TextItem",
hint: "<nobr>>?<??????????????</nobr>"},
{ name: "state", title: "State", editorType: "ComboBoxItem",
valueMap: {'AL':'Alabama','AR':'Arkansas','AK':'Alaska','FL':'Florida','LA':'Louisiana'},
filterLocally: true, addUnknownValues: false},
{ name: "phoneNo", title: "Phone No.", editorType: "TextItem",
mask: "##########", hint: "(###) ###-####", showHintInField: true},
{ name: "dateItem", title: "Date", editorType: "DateItem",
useTextField: true, useMask: true},
{ name: "dateTimeItem", title: "Date Time", editorType: "DateTimeItem",
useTextField: true, useMask: true},
{ name: "timeItem", title: "Time", editorType: "TimeItem",
useMask: true}
]
});
Viewing the above, when you type, say 'AL' into the state field, only 'L' shows up and the search goes to Louisiana instead of Alabama.
a) is there a better way to default all text input fields to uppercase (with the ability to override on individual components)?
b) can I create a custom version of TextItem (with characterCasing as desired) and make that the default editorType for all text fields?
c) is this a bug related to this setting (and since ComboBoxItem is based on TextItem)?
Thank you.
Comment