I am building a form for someone to enter loan details so that my app can calculate a monthly mortgage payment. Some of the numbers the user adds will be in currency and some will be a percentage. How can I set the format of an input field so that the number input is correctly formatted?

Input field cannot be formatted. You can format it through the editor but you can view it formatted only after adding the record.

Thanks for replying Anotonio. That seems like a really big problem for me for the calculator app that I want to build. This would mean that for my users to enter their interest rate for their mortgage loan they would have to select or enter .05125 instead of 5.125% for example and in order for them to enter their loan amount they would have to enter something like 350000 instead of $350,000. I think a lot of people would be completely confused by this.

I don’t think I’ve ever been asked to enter a dollar sign ($) when entering an amount in a form, and I’d consider it extremely odd if I was. For your percentage rates, just ask your users to enter as 5.125 and then divide it by 100 in your calculations.

On the subject of calculations - are you planning to do all your calculations using Google Sheet formulas? If you are, you should be aware that your calculator will not be very responsive in terms of providing results. Once a user enters data, there will always be a delay while the data is sent to the Google Sheet, the formulas are calculated, and the results sync back to Glide. This delay will vary according to a number of factors, but will typically be somewhere between several seconds and a few minutes.

If you want instant results, I would strongly recommend exploring Glide Computed columns and the large number of Plugin columns available. With Glide apps, it’s generally recommended to avoid spreadsheet formulas as much as possible.

The user wouldn’t enter the dollar sign but when they hit enter they would see the number that they just entered formatted like currency so for example 300000 would appear as $300,000. I think it will work for them to enter the numbers as numbers on the forms. That was a really good suggestion to have them enter the percentages as 5.125 and then divide the result by 100 in the calculations. I think that will be a workable solution.

I am actually planning to do the calculations using the math functions that are built into Glide. My plan is to use amortization tables in the data editor. The way that works is there is a specific factor associated with each percentage rate for the specific loan term (ie 30 years) and you simply create a relation column that searches for the entered rate and retrieves that factor which is then multiplied times the number of thousands of principle and that gives you the principle and interest part of the payment.

I’m really excited to put my calculator app together. I think I have a workable plan for it.

I really appreciate your suggestion about the percentage rate.

Thanks again Darren.

Have a good night.

Sounds good