Editors, messages, and restrictions [message #141428] |
Mon, 10 October 2005 03:53 |
orahugo
Messages: 32 Registered: October 2005 Location: England
|
Member |
|
|
Hello,
How can you write the code to display a message when a certain condition is reached?
I have an editor box. It is called from a mousedoubleclick trigger when someone double clicks in a field. It allows the client to change/enter user information.
However, the field is only 100 characters long. I want to restrict the user from entering more than 100 characters in the editor box as when they do this and enter it, all the information becomes lost and there is nothing displayed in the field.
The editor box seems to have no restriction to the amount of data put in. Ideally I'd like to set a restriction, but I'm guessing I can't so all I could think was to do an "if length(variable) > 80" kinda thing.
I currently use form builder.
Thanks in advance.
|
|
|
|
|
Re: Editors, messages, and restrictions [message #141673 is a reply to message #141548] |
Tue, 11 October 2005 10:10 |
orahugo
Messages: 32 Registered: October 2005 Location: England
|
Member |
|
|
djmartin wrote on Mon, 10 October 2005 18:24 | If you set the 'physical/width' and 'data/maximum length' to the database length then the user can NOT enter more characters than will fit into the database field. So testing is not necessary.
David
|
For some reason this doesn't affect how many characters you can put into the editor. Any further ideas?
[Updated on: Tue, 11 October 2005 10:11] Report message to a moderator
|
|
|
|
|
Re: Editors, messages, and restrictions [message #141943 is a reply to message #141784] |
Wed, 12 October 2005 19:27 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
I have tried a simple example in Forms 6 (not 6i) and it performs as I mentioned previously. I am using the default editor.
Please revisit your database definition and form. Verify the length in the database, make an item based on that field, make the 'Physical/Width' and 'Data/Maximum length' equal to the database length. Make sure that 'Editor/Editor' is null (press the 'Inherit' button to reset the value to 'default' if the field is currently set to something else eg. 'SYSTEM_EDITOR'). Add a When-Mouse-Doubleclick trigger containing 'edit_textitem'. Run the form and double click the field. On my machine (Unix C/S through X-Windows) it stops accepting further input after the maximum number of characters have been entered.
I will do a search of metalink for a patch in a minute. Which patchset of 6i are you using (I hope either pacthset 4a or patchset 13 or higher, but NONE inbetween).
David
[Updated on: Wed, 12 October 2005 19:27] Report message to a moderator
|
|
|