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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...