cancel
Showing results for 
Search instead for 
Did you mean: 

How to do data validation before the submit by email

0 Kudos

I am developing an offline interactive form. There is submit button inside, which should check all data and submit the form by email if checking passes.

My problem is that I can not cancel the submit event when the checking failed.

I use Adobe LiveCycle Designer 7.1.3284.

If I use Email Submit Button, I can do validation in presubmit event. But I can not cancel the event. Even there is error in validation, form is submitted anyway.

If I use normal button, I can do validation in Click event. But I can not submit form with code.

Is there anyone who has experience on this issue?

Best Regards,

Jun

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member189058
Active Contributor
0 Kudos

Hi Jun,

Use a normal button to validate and set the presence of the E-mail button only if validation is successful, else keep the Submit by E-mail button hidden.

Regards,

Reema.

0 Kudos

Thank you for your solution. Then there are two buttons in the form, one for validating and one for submitting. The problem is that after validating, user can change something and make data invalid, then he still can submit the data with Submit button.

Is there other solution? I think this is a common use case for offline form.

former_member189058
Active Contributor
0 Kudos

in that case, you can code just one line in the change event of all fields of the form


xfa.form.form1.....button_validation.presence = "visible"
xfa.form.form1.....button_submit_by_email.presence = "hidden"

After click of validate button,

if validation is successful,


xfa.form.form1.....button_validation.presence = "hidden"
xfa.form.form1.....button_submit_by_email.presence = "visible"

0 Kudos

With these code, user still can do changes and submit without validation.

chintan_virani
Active Contributor
0 Kudos

Jun,

Do the validations in the exit event of fields as well.

So when user goes back and changes something, exit event will be triggered where your validation will be done and hide the EmailSubmit button if the validation fails.

Chintan

chintan_virani
Active Contributor
0 Kudos

Jun,

Did you resolve this? If yes then mark the thread as answered.

Chintan

Former Member
0 Kudos

Hi,

I faced the same problem and what i've done is to hide the submit button until all controls are ok .

When controls are ok i make the button visible, if user change a value and controls become not ok the button diseapears.

Hope this help you.

Regards