on 07-27-2009 2:26 PM
Hi,
In my adobe form there is one ISR Multiple line edit input element. If the user enters less than 2 characters, the system should
throw error saying that the length is less than 2. I guess some java scripting is needed for this.
Please help.
Thanks,
Himanshu
Hi Chintan,
Thanks for reminding, I have donethe same.
Cheers,
Himanshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for all your answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madhu,
Thanks a lot, it worked but any idea how to give message on the top of the page(not in a popup box).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Himanshu,
You can try out two things, see it it serves your purpose.
1. Place a ISR_TextDisplay element on top of form. Keep it invisible in by writing following code in form:ready event of subform
ISR_TextDisplay.presence = "invisible"
and and then write the code in Exit event .
var a = $.rawValue
var s = len(a)
if ( s < 2 )
then
ISR_TextDisplay.presence = "visible"
ISR_TextDisplay.rawValue = "Length is less than 2"
endif
2. Alternatively for the ISRMultipleLineEdit element goto the Object palette --> Value tab --> Change the type as User Entered Required. This will a red border if user has forgotten to enter any data in that field.
Chintan
Hi
Place the below script in Exit Event of your field with Script selected as Formcalc
var a = $.rawValue
var s = len(a)
if ( s < 2 )
then
$host.messageBox("Length is less than 2")
endif
Thanks & Regards,
Madhu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Himanshu,
you may need to use form calc here for coding.
On the input field 'validate' event use the following method on the input value to check the length
Len(s) where s is the string to be examined
then you can show a message to user saying the length is less
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.