Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
rohitn62196663
Level 3

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
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

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
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
rohitn62196663
Level 3

Likes

12 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
rohitn62196663
Level 3

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
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

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.