Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Validation questions

Avatar

Level 2

My form is now correctly selecting a destination (email address), and I've started adding validation features. I've set several fields to "User Entered - Required" and I've defined validation patterns for dates, email addresses, and phone numbers. Those with validation patterns have validation pattern messages.

The issue I'm seeing is that I get pop-up windows showing the validation pattern messages whether the content of the field matches the pattern or not. If the fields have valid content, the form does send a PDF by email, despite all the validation messages.

Is that normal? If not, what do I need to do to correct the issue?

10 Replies

Avatar

Level 10

If the field does not have a valid pattern, the validation pattern error message should be displayed and then the focus should be still with the field to have the user enter the correct pattern before the form is submitted.

Thanks

Srini

Avatar

Level 2

I'm getting error messages at submit time, even though the contents of the fields have the correct patterns.

Avatar

Level 10

Probably looking at the form can help..

Steps to share a document..

1. Go to URL http://Acrobat.com
2. Create an account if you don't have one.
3. Then login to the website.
4. In top left corner you will see a button called Upload.
5. Click on browse and select the file you want to upload.
6. After Uploading, mouse over on the uploaded file. Click the down arrow button and choose Share document.
7. Then you will be prompted a popup window at the lower left corner. Choose "Publish it" option.
8. In the next pop up window choose "Copy Link" option.
9. You can paste the link in the forum thread.

Thanks

Srini

Avatar

Level 10

Here is the modified version of the form.

https://acrobat.com/#d=JvLEHTnS8nOni65ER01Kig

If you see, I have changed the Required fields to optional and I am checking their values in the preSubmit event.

Do the same for the rest of the required fields.

Let me know if you still have issues.

Thanks

Srini

Avatar

Level 2

I've applied your principles to my form, but I had already done work on a second page, so I had to copy and paste your code and modify it.

https://acrobat.com/#d=1uhmam-WQBGPj8o1joPwuA

I must have introduced a bug, because this version freezes when I click submit.

Avatar

Level 2

I suppose I should add that I would like the form to become non-editable upon submission. The recipient should get a flat PDF instead of an fillable form. Wouldn't want the submitter's data to be altered.

Avatar

Level 10

If you follow the below forum thread, Paul had given a sample file on how you can convert the form to a readable form upon submission.

http://forums.adobe.com/thread/341252?tstart=60

Thanks

Srini

Avatar

Level 2

Any idea why the form would be crashing when it actually gets through validation to be sent? Even the version you posted does that. I'm just wondering if it's something to do with the email configuration on this end, or if there's actually something wrong with the code.

Avatar

Level 10

Few things on your form..

1) Copy the code in the preSubmit event - important before you go to Step 2.

2) Change the Send Request button type to Regular from Submit.

3) Paste the previously copied code into the click event of the button.

4) Then Reader extend the form using Acrobat Pro.

     a) Open the form in Acrobat Pro

     b) Goto Advanced menu -> click on Extend Features in Adobe Reader

     c) Save the form.

Here is the form with the above changes.

https://acrobat.com/#d=S1nXQwi6h22ibZDb37eTBA

Thanks

Srini