Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Core Component Form Text Required Message / Constraint Message not showing as filled

Avatar

Level 2

We're using the Form core components in AEM 6.5

The form text however does not behave as expected. After adding Required Message :

marissi_0-1695722501239.png

 

It should show the message as mentionned in a tooltip. Instead, we're getting what seems to be a generic message in the language of the site: 

marissi_1-1695728506078.png

 

There is also a slight difference in the wording of the message depending on the browser used.

 

Same issue with Constraint Message.

 

Is this behavior normal? Did we miss a configuration somewhere?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

It should not show the default message, the authored message should be shown but somehow something is broken and custom/Authored message is not visiable.



Arun Patidar

View solution in original post

9 Replies

Avatar

Community Advisor

Hi @marissi ,

Can you check in browser console if you are seeing any Java script error. If yes, then please try to fix it.

Thanks
Tarun

Avatar

Level 2

Hello @TarunKumar   Thank you for taking the time to reply.

 

The console doesn't show any errors.

Avatar

Level 2

Hello @arunpatidar 

 

The message shown is "Veuillez remplir ce champ" which means "Please fill in this field" in French, the language of the site the component is used in. This message could potentially work as it is logical and makes sense for the validation, but it is not the message that was authored. It seems we do not have access to customize validation messages and the component defaults to browser to handle content of the message (like I said, the wording of the required message varies slightly from browser to another, but ultimately have same meaning, i.e the field needs to be filled in)

 

Is this behavior normal, even though the documentation specifies otherwise?

We're considering overriding the form components and changing the javascript.

Avatar

Correct answer by
Community Advisor

Hi,

It should not show the default message, the authored message should be shown but somehow something is broken and custom/Authored message is not visiable.



Arun Patidar

Avatar

Administrator

@marissi Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni

Avatar

Level 3

Hi @marissi ,

 

were you able to pinpoint the issue or get a resolution?

 

we are facing a similar issue, but its actually intermittent. Sometimes, we get the proper validation message from core component authored required message.

 

but other times, it reverts back to default message.

 

it works, if we delete the page and recreate and publish. but after a while, it reverts back again.

 

could be issue with adobe core component , forms text. 

 

let me know if you have any insights.

 

thanks.

Avatar

Level 2

Hello,

No it was taking too long with no way to get logs on what was actually going on, so we just left the default browser behavior.

 

If you do find out what's causing it or how to fix it, please let me know

Avatar

Level 3

hi @marissi ,

 

no, as its low priority issue, we let it be. Because, sometimes, it shows proper validation message, and sometimes it doesnt.

 

I found the js from core component which sets this

 

https://github.com/adobe/aem-core-wcm-components/blob/main/content/src/content/jcr_root/apps/core/wc...

 

Screenshot 2024-09-04 at 10.23.38 AM.png

 

if anyone else has inputs please let me know.

 

thanks