I'm trying to get a users input to format as a currency as it's shown on the front end. I have the Currency Formatter component downloaded and have used it successfully in other places, but I'm not finding how to get this to work here. Any help would be great! I suppose I could change the element from 'Input' (right?) but if I can get this to work it'd be much less hassle. Thanks!
needtheanswers
1 year ago
I‘ve also tried to make this work but ended up using formatNumber in the Toddle formula. Not quite what I wanted but you can also use this for currencies
👍1
Fisher
1 year ago
OK, well good to know there's a workaround. Did you use that input elsewhere in your page? The reason I ask is because mine goes to an API call and I want the numbers but not the formatting.... but I want the user to see the nice formatting ha!
needtheanswers
1 year ago
I use this input a few times in my project. It also goes to my database. I think to format the input while the user is typing we would need a custom js action (currently trying to figure this out🥲).
needtheanswers
1 year ago
using formatNumber I don‘t have any issues when sending the value to my db. I multiply the value x100 because I don‘t use decimals in my db tho.
needtheanswers
1 year ago
Another idea would be to let the user typec in the value, format it using formatNumber, get the value, let the user type in, format it, get the value,.. and so on ( something like a constant back and forth between the input and the value)
Fisher
1 year ago
Do you have a screenshot of your formula? I can't seem to get it right. Also, it goes here? (Note for posterity: the attribute here should be 'value' not 'Type')