Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Render XFA as HTML- Issues with Texfield Validation

Avatar

Level 2

I am working on an AEM project where the XFA form is rendered as HTML and am having an issue with validation of an textfield.  I have a textfield where the user is supposed to enter a phone number.  I set up the validation as follows: Object/Value - Validation Pattern - I set Validation, Edit, Display as a phone number.  I check off both Validation Pattern Message and Validation Script Message and wrote in an error message in both.  When the user types in non-numerals, and exits the field, if it is a PDF, an error message displays at that time and the border is highlighted in yellow.  However, if the form is rendered as HTML, the border highlights, but the error message does not display.  Instead, if the user clicks the field again or submits the form - the error message displays at that time.  We want the message to display when the user exits the field as it is supposed to.

 

In fact, the ValidationState event has the same bug with HTML - the event does not occur when the user changes or exits the field.

 

I recall from past projects experiencing a similar bug when a form is rendered on a browser as a PDF.

 

Is this a bug?  Or am I setting the field up incorrectly?

 

Thank you for feedback.

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

I communicated with Adobe on this topic and have enough information to give a correct reply.  I summarize below the information I was given:

-Not everything that is supported in a PDF rendering is supported in an HTML rendering.  One needs to test with HTML build to see what is supported.  With designer interface validation, in the event of a failed validation, the PDF rendering supports both a change in border color as well as the display of an error message when exiting the field.  However, with the HTML rendering, the error message on field exit is not supported.   Event scripting can be used to remedy this.

View solution in original post

3 Replies

Avatar

Employee
Please give us the AEM Forms server version and the version of Adobe Designer you use.

Avatar

Level 2

AEM Server version is 6.5.4.0.  Adobe Designer version is 6.5.0.201903203.935878

Avatar

Correct answer by
Level 2

I communicated with Adobe on this topic and have enough information to give a correct reply.  I summarize below the information I was given:

-Not everything that is supported in a PDF rendering is supported in an HTML rendering.  One needs to test with HTML build to see what is supported.  With designer interface validation, in the event of a failed validation, the PDF rendering supports both a change in border color as well as the display of an error message when exiting the field.  However, with the HTML rendering, the error message on field exit is not supported.   Event scripting can be used to remedy this.