Having a headache trying to format a text box to be $ currency. I can only get to the currenct converter after turning a text box into a number using the expression fields but that doesn’t work. Please guide me as to how to do this. I know it’s got to be pretty simple so racking my brain that I can’t figure it out.
sure have a look, its just a proposal form for quoting jobs to customers. Most of the boxes are currency. At the moment, it is just a local form. I do intend to store all of this in a database but wanted to figure out what I wanted first.
the subtotal, sales tax and total boxes at the bottom right end should be formatted as currency. Those are the most important ones. However, there are many more boxes which add up to these which get displayed when you hit the buttons.
I had to convert text boxes to numbers in order to calculate totals which is fine although I would have thought that by specifying the box as a number it would have been ok. The calculations don’t work otherwise. Now I just need to make it look nice by putting in $ sign and 2 decimal places.
As far as what I’m trying to do is just make it fast to create a quote on the fly in front of a customer without having to calculate by hand. My wife currently does this by hand and it takes her a few minutes which seems like a long time when you have a customer waiting. I wanted a form which she could just touch buttons and add quantities to create it. I have it working and is really fast to create, now I just have to make it something worth showing a customer and printing out. Eventually, I’d like to have the customer sign electronically as a contract. All doable in time.
Hope this helps give you background. The formating is what I need help with right now.
that makes sense, but it still doesn’t work exactly as you sent it.
The reason I’m using text boxes is that the data needs to be editable before saving to the database as happens during a negotiation.
I’ve tried a lot of combinations for the parentheses and single vs double quotes vs " . It does work when there aren’t calculations. ???
i can confirm this does not work. have a similar use case where calculating 2 values from text box and have to show the value with currency and 2 decimal places.
however, this did work for us @marsalstudios, give this a shot:
thanks @nshkrsh . Wow, calculating then converting to string (toFixed) then number, then currency works? I’ll try it. I agree manually coding the formulas makes sense in these cases. The logic is hard make happen in the visual builder. That’s probably why it doesn’t work right at this stage. Can’t knock Wappler though, it’s so much more flexible than other data tools. It will only get better.