on 05-24-2007 7:47 AM
When I enter more than 255 characters in a field and save, the backend only saves the first 255 characters. How do I limit my input field to only accept 255 characters?
thanks
Anton Kruse
Hi Anton,
Create a simple type of base tyep string.. In the simple type , specify the min and max length.
Change the value attribute datatype to this simpletype and map it to the input field.
Note : This does not affect the displayed UI length of the input field.
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Follow the procedure given by Bharathwaj ,
create a simple type with string as base type and specify max length to 255.
Change the value attribute datatype to this simpletype and bind it to the input field.
Once it is bound with the inputfield,you can enter only 255 chars in that input field.
More than that specified chars are not displayed in the input field.
You can specify smaller number to test the same.
Hope it helps
Regards,
Santhosh
Hi Anton,
If you are talking about TextEdit then the display of that has to be controlled by the properties cols and rows.
And to restrict the input characters you can
1) first create a Simple Type Using dictionaries in the tree structure
2)switch to representation tab and there u can set the external length 255
3)create a context and select type--> set with corresponding data type
4)now bind your text edit property value with your context.
Hi Anton,
For creating a simple type go to the dictionary in WD explorer.Over there in data types you get simple type and Structure option under the simple type you create it.
Regards
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anton,
I got your point.But I dont think that keyboard events are incorporated in WD 7.0.
So i am not sure if this is possible.
Regards
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anton,
Here you require to create a simple type which has the built-in type String and you can also set the minimum and the maximum length under the definition type.
If you enter more than 255 characters after setting the same as the maximum length the WDF will throw an error message for the same and the action will not be called.Does this suffice your requirement.
Regards
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.