Expand my Community achievements bar.

SOLVED

Field Validation in HTML5 forms using AEM Designer

Avatar

Level 4

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

Avatar

Correct answer by
Employee

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

Avatar

Correct answer by
Employee

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,