Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Field Validation in HTML5 forms using AEM Designer

pranaym48551345
Level 2
Level 2

Hi All,

I have a use case where i need to validate few fields displayed on the form before printing the form in HTML5.

 

I am checking the presence property of the fields and validating if the field has any values. The code is working fine in PDF as i am able to get the number of fields which are mandatory and which are left blank, but the same code in HTML5 is not working as it is not giving me the correct count.

 

Also in HTML5, The form is considering the fields which are present inside the hidden subform for mandatory checks. Is it an expected behavior..??

 

Can you please let me know if there is a way i can check for mandatory and non mandatory fields in HTML5 form to perform this validation at runtime.

 

Thank
Pranay

1 Accepted Solution
Lavanya_Pejjayi
Correct answer by
Level 3
Level 3

Hi pranaym48551345,

 

All PDF forms functions will not support by HTML5.

The  best option is write a custom script to validate the mandatory checks.

 

Below are the few articles you can go through to write the custom script.

https://experienceleague.adobe.com/docs/experience-manager-64/forms/html5-forms/scripting-support.ht...

 

I hope this helps.

Thanks,

View solution in original post

1 Reply
Lavanya_Pejjayi
Correct answer by
Level 3
Level 3

Hi pranaym48551345,

 

All PDF forms functions will not support by HTML5.

The  best option is write a custom script to validate the mandatory checks.

 

Below are the few articles you can go through to write the custom script.

https://experienceleague.adobe.com/docs/experience-manager-64/forms/html5-forms/scripting-support.ht...

 

I hope this helps.

Thanks,

View solution in original post