Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

PROBLEM: Text in numeric field

Avatar

Former Community Member

Hi =)

..I'm having a problem with some (not all) numeric fields in a form.

In the troubled ones I can type letters in them. When I exit the field it's displayed an error message and the field is cleared.

How can I make the field accept only numeric characters when typing?

I just don't understand what I changed to make this happen..

If someone has a clue, please tell me something.

Thank you =)

1 Accepted Solution

Avatar

Correct answer by
Level 10

Usually as long as your TextField is a NumericField Type in the object field properties, only numeric characters can be entered...

if you can type in letters and the object type property is still NumericField, you probably should delete the object and recreate it...

Otherwise, if the object type property is not a NumericField, change it to NumericField...

If non of these options is your solution, try changing the validation pattern...

Hope this help!

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Usually as long as your TextField is a NumericField Type in the object field properties, only numeric characters can be entered...

if you can type in letters and the object type property is still NumericField, you probably should delete the object and recreate it...

Otherwise, if the object type property is not a NumericField, change it to NumericField...

If non of these options is your solution, try changing the validation pattern...

Hope this help!

Avatar

Former Community Member

Hi =)

Thank you for your answer! =)

I've deleted the field and created a new one which is working like it should.

I think the problem was that I changed it from text to numeric field. Anyway..its solved!

Thanks again for your reply!