ISC version: SmartClient_v90p_2014-01-24_Pro
We specify "length" attribute on the "text" datasource fields in order to limit the user's input (in order to comply with the DB schema).
We'd like the form items to behave the same way as the native browser components do:
when you reach the maximum number of characters, you can NOT type anything else in the fields.
Steps to illustrate the problem:
1. Type "0123456789" in the form field. This reaches the fields' max length: when your cursor is at the end of the selection, you can NOT type anything else.
2. Move your cursor to the beginning of the field (left most position)
3. Type "z".
In ISC, you end up with "z012345678". The "9" has been dropped out of the field.
In native form component, you can NOT type "z". Your initial input remains unchanged.
We consider ISC's behaviour to be wrong.
In a simplistic example as the one I built, it's obvious the content changes because you see the whole content.
But, imagine you have a text field that supports 2000 characters and the textarea does not show all the content (scrollbar displayed). A user wants to add something at the top of his text box. How can a user figure he's currently destroying the end his previous value ?
Are there attributes we can enable/change to support the behaviour we want ?
Here are the code snippets I used to build my example.
ISC form:
Native form:
Thanks !
We specify "length" attribute on the "text" datasource fields in order to limit the user's input (in order to comply with the DB schema).
We'd like the form items to behave the same way as the native browser components do:
when you reach the maximum number of characters, you can NOT type anything else in the fields.
Steps to illustrate the problem:
1. Type "0123456789" in the form field. This reaches the fields' max length: when your cursor is at the end of the selection, you can NOT type anything else.
2. Move your cursor to the beginning of the field (left most position)
3. Type "z".
In ISC, you end up with "z012345678". The "9" has been dropped out of the field.
In native form component, you can NOT type "z". Your initial input remains unchanged.
We consider ISC's behaviour to be wrong.
In a simplistic example as the one I built, it's obvious the content changes because you see the whole content.
But, imagine you have a text field that supports 2000 characters and the textarea does not show all the content (scrollbar displayed). A user wants to add something at the top of his text box. How can a user figure he's currently destroying the end his previous value ?
Are there attributes we can enable/change to support the behaviour we want ?
Here are the code snippets I used to build my example.
ISC form:
Code:
isc.DataSource.create({ ID: 'myDs', fields: [{ name: 'comment', type: 'text', length: 10 }] }); var vm = ValuesManager.create({ dataSource: 'myDs' }); isc.DynamicForm.create({ width: 400, valuesManager: vm, fields: [{ name: 'comment', title: "TextArea", type: "textArea", maxLength: 10 }] });
Code:
<html> <body> <form> Native : <textarea maxlength="10"></textarea> </form> </body> </html>
Comment