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

In Livecycle, How do I hide the first five numbers in a SSN and make the last 4 visible using JS, jquery, or just Livecyle?

Avatar

Avatar
Boost 1
Level 1
lanceb46396443
Level 1

Likes

2 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
lanceb46396443
Level 1

Likes

2 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
lanceb46396443
Level 1

05-10-2015

There has to be a way in LiveCycle to enter a SSN and it automatically hides the numbers entered and keeps the final four visible. LiveCycle may have a solution but I may have to use JS or jQuery.

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

06-10-2015

In Designer you can use either the scripting language FormCalc or JavaScript but not jQuery.

Can you please provide a better description of what you're after?

How do the SSN look like you will enter and how the< should look finally?

Avatar

Avatar
Validate 1
Level 5
dcidev
Level 5

Likes

30 likes

Total Posts

448 posts

Correct Reply

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

Avatar
Validate 1
Level 5
dcidev
Level 5

Likes

30 likes

Total Posts

448 posts

Correct Reply

77 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
dcidev
Level 5

07-10-2015

Try this:

1) Create a hidden field ("hiddenField") to store the SSN value

2) In your SSN input field under the enter event (JavaScript) put:


this.rawValue=hiddenField.rawValue;


3) In the same field under the exit event put:


hiddenField.rawValue=this.rawValue;


this.rawValue="*";


for (var i=0;i<hiddenField.rawValue.length;i++){


  if (hiddenField.rawValue.length>i+4)


  this.rawValue+="*";


  else


  this.rawValue+=hiddenField.rawValue.substr(i,1);


}


Kyle