Replace characters within a string

Hello Guys
I would like to find a way to do the following :
A user enters in the field forms “name” its name : Mr Clinntowny
I want to store in my database in a field “hidden_name” : Mr Cl******ny
How can I do this ?
Thx a lot for your help

Use the ‘Execute Javascript’ functionality from the Toolbox plugin

Javascript has great built-in string manipulation functionalities - that will be easier than doing it directly with Bubble