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

Avatar

Avatar

rohitn62196663

Avatar

rohitn62196663

rohitn62196663

06-04-2018

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.

Replies

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

06-04-2018

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

Avatar

Avatar

rohitn62196663

Avatar

rohitn62196663

rohitn62196663

06-04-2018

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

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

08-04-2018

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.