Display error messages for multiple fields 

Ue the attached package to simultaneously display error messages for all the fields. To display a single error message, use the default profile.

Customizing the appearance of error messages. 

  1. Navigate to the etc\clientlibs\mf-custom-error-manager\CustomErrorManager\css folder.

  2. Open the file sample.css for editing. The css file contains 2 ids- #customError, #customWarning. You can use these ids to change various properties such as color and font size.

    Use the following code to change the font size and color of error/warning messages.

    #customError {
    color: #0000FF; // it changes the color of Error Message
    display:none;
    position:absolute;
    opacity:0.85;
    font-size: 24px;  // it changes the font size of Error Message
    z-index:5;
    }
    
    #customWarning {
    color: #00FF00;  // it changes the color of Warning Message
    display:none;
    position:absolute;
    opacity:0.85;
    font-size: 18px;   // it changes the font size of Warning Message
    z-index:5;
    }
    
    Save the changes.
    
  3. Save and close the file.

  4. Navigate to the CustomErrorManager-1.0-SNAPSHOT folder and create an archive of jcr_root and META-INF folders. Rename the archive to CustomErrorManager-1.0-SNAPSHOT.zip.

  5. Use the Package Manager to upload and install the package.

Render the form with the new profile. 

Out of the box, html5 forms use a default profile: https://<server>/content/xfaforms/profiles/default.html?contentRoot=<xdp location>&template=<name of the xdp>

To view a form with the custom error messages, render the form with error profile: https://<server>/content/xfaforms/profiles/error.html?contentRoot=<xdp location>&template=<name of the xdp>

NOTE
The attached package installs the error profile.

Experience Manager


Espressos & Experience Manager: AEM Forms

Espressos & Experience Manager

Thursday, Mar 6, 7:00 PM UTC

Join Adobe's AEM product team as they highlight AEM Forms' latest innovations, including: the new Gen AI Assistant, Unified Composition with AEM Sites, and new ways to deploy forms through conversations.

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more