Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

calling jquery focus is not persisting the value on the AEM form textbox component

Avatar

Level 4

I am trying to mask a value in the textbox component by using jQuery. When I click or tab in to the field it should show the complete value and once I tabout of the field it should mask all the digits except for last 4. When the user clicks or tabs in to the field I am triggering the jQuery focusin event and then I am trying to displaying the actual value. But its not working. Instead of showing the actual value its just showing the last 4 digits.

When I debug the code, the jQuery focusin event is getting triggered and its showing the actual value in the field but after that there is some script which getting executed within the "/etc/clientlibs/fd/af/I18N/en.js" which is overriding the value. I am not sure if this is coz of some internal script within AEM forms which is causing this issue. Do I need to call any AEM API or script for such kind of things. I also looked into AEM forms appearance framework but not sure whether its going to solve my issue.

3 Replies

Avatar

Level 10

Can you get this logic to work with JQuery outside of AEM - for example - in a non-AEM web application?

Avatar

Level 4

Yup I have done that. I have that even worked for custom Aem site components as well. But for form components it’s not working.

Avatar

Level 10

So it works if you use it in a sites page - but not in an Adaptive Form? That is very strange as it should behave the same way, Can you confirm.