Text Input Number formatting

Hello! If you can work out how to do this I will be incredibly grateful!

I am trying to use a form that allows the user to enter in these four variables:

  • Loan Amount (Text Input field - Number type)
  • Loan Type (radio buttons)
  • Repayment Type (radio buttons)
  • Current Rate (Text Input field - Number type)

I am trying to make it so that when the user input their loan amount the numbers get formatted like this:
instead of how they currently are like this:

I cannot work out how to do this. Can someone please help?