on 10-28-2010 9:48 AM
Hi,
is there a way to create an error message so that the user can't submit the form until the error is solved?
On my form I am doing some validation checks when the user hits the button to submit the form via e-mail.
So if something on the form isn't filleld out correctly the user gets an error message. But after the user has clicked ok on the error message he can still send the form.
So I am searching for a way that he can only submit the form if he has resolved the problems.
I tried with
xfa.host.messageBox("material is not valid!" , "error", 0);
but this only shows the error messagen and doesn't prevent the next step.
Can I solve this with using a different type of error message, or user different parameters at the messageBox?
Thanks for your help.
Martin
Well you can have two buttons, Validate Form and SubmitByEmail on your form.
Now only if Validate Form button returns you no error, make the Submit Email button visible else keep it hidden.
Also put all validations in the exit event of fields as well so that if user tries to change after Submit Email button has become visible it will take care of that as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Martin Beyer
try like this.
in submit button CLICK event u have to right validation for fields which u want to check.
example : here iam validating two varibles.
var sub=0;
if(sub==0)
{
if(fields2.item(i).rawValue == null && fields.item(i).rawValue != null)
{
sub++;
xfa.host.messageBox("Status of Achievement is Mandatory");
xfa.host.setFocus(fields2.item(i));
break;
}
}
if(sub==0)
{
var Repe = xfa.host.messageBox("Do you want to Submit now???", "Warning", 2, 2);
if (Repe == 4)
{
sub=0;
}
else
{
sub++;
}
}
hope it will help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.