Jump to content
joer80

Float of 10.50 saving as 10.5

Recommended Posts

Is it possible to have a float field not drop an ending 0?

Thanks!

Share this post


Link to post
Share on other sites

Its for the backend.  People are entering money that I want to be sortable on the front end and it is odd to enter money into the backend and not have the option for 2 decimal spots. 

Share this post


Link to post
Share on other sites
9 hours ago, alxndre said:

You could try using the FieldTypeDecimal module for this. If I remember correctly, there is a setting to specify number of decimal places in there.

+1

Your clients might also find this helpful:

 

  • Like 1

Share this post


Link to post
Share on other sites

The FieldTypeDecimal module worked to allow people to enter cents! 

Do you think this should be in core or if we should allow the core float field to do this?  I would think entering money would be very common? 

Share this post


Link to post
Share on other sites

This has been discussed before. I'm not against it, but I'm also fine with using the module. It works reliably.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...