How to get genarate string from plugin and pass to database and show in page

I have installed a plugin called “Random String Generator”. What I would like to do is, genarate a string like “Test0000001”. Where the only static value would be TEST and the numbers would generate when de user creates a contract. And after the user cliques in the buttom to save all the information, is when this string is generate and saved inside my database. Next, when the next page is loaded, I would like to show the genarete string in my page. How can I achieve this behaviour!? I cannot pass this string inside my text field or input field because each contract has to have a unique string. And I cannot use the calculate formula because I can’t pass the “TEST” value before the numbers Thank you!