on 09-30-2008 7:41 AM
Hi
i have two textfields in adobe form with labels TODATE AND FROMDATE,where TODATE should always be greater than FROMDATE.can you please tell me where to write validations for adobe form and what is the code required for it.
Thanks
krishna
Hi,
Write this code inside submit button.
As Date class is implementing Comparable interface u can use "compareTo(Object)" method which returns integer value
Try this code.
Date from=get the From Date(from the attribute)
Date to=get the TO Date (from the attribute)
int i= from.compareTO(to);
if(i>0)
to date is bigger
else if(i<0)
from date is bigger
else
both r same.
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi kirshna,
You can write code inside action of submit button.
Thanks
Anup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi!
you can create actions on onCheck and onSubmit in the property of interactive form and then do your your validation there.
thanks
vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can also create one method and call that method from onCheck action.if you dont have any button in tour form then try doing this in modifyView.i am not sure whether it will work or not and also it will cause a performance issue as it will hit server multiple times so i think its better to take submit button inside the form.
thanks
vishal
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.