Cameron Posted July 9, 2014 Report Share Posted July 9, 2014 Hi, My application works with credit cards.Is there any standard feature to display only last four numbers and to display * instead of other numbers? Can I send this *******0000 number to a client by email? Thanks for advice! Quote Link to comment Share on other sites More sharing options...
Jan Posted July 10, 2014 Report Share Posted July 10, 2014 Hi Cameron, If I understand correctly, you want to display the last four numbers on a confirmation form and/or send it by email. I think, you can add a Hidden Virtual field and send its value as a parameter to a confirmation form or add this value to a email. You can use the following JavaScript code to place only four last numbers to the Hidden Virtual field: <SCRIPT LANGUAGE="JavaScript"> function cards() { var lastfour = document.getElementById('InsertRecordFIELDNAME').value.substr(-4); document.getElementById('cbParamVirtual1').value='*******'+lastfour; } document.getElementById("caspioform").onsubmit=cards; </SCRIPT> Please enter the name of your field instead of FIELDNAME and make sure that number of Hidden Virtual field is correct for your DataPage. I hope it helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.