Core Component Form Text Required Message / Constraint Message not showing as filled | Community
Skip to main content
marissi
September 26, 2023
Solved

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

  • September 26, 2023
  • 4 replies
  • 2376 views

We're using the Form core components in AEM 6.5

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

 

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: 

 

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

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.

4 replies

TarunKumar
Community Advisor
Community Advisor
September 26, 2023

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

marissi
marissiAuthor
September 26, 2023

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

 

The console doesn't show any errors.

marissi
marissiAuthor
September 28, 2023

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.

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
September 28, 2023

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
kautuk_sahni
Community Manager
Community Manager
September 28, 2023

@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
September 2, 2024

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.

marissi
marissiAuthor
September 3, 2024

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 🙂

September 4, 2024

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/wcm/components/form/text/v2/text/clientlibs/site/js/text.js

 

 

if anyone else has inputs please let me know.

 

thanks