Title: Decimal Fields
Last modified: March 15, 2018

---

# Decimal Fields

 *  Resolved [supernova42](https://wordpress.org/support/users/supernova42/)
 * (@supernova42)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/decimal-fields/)
 * I’m using Decimal Fields for Latitude and Longitude values in order to plot them
   on a google map. Firstly, decimal fields in Participants Database have a 4 decimal
   point precision. In order that I have very precise latitude and longitude values
   can this be increased to 6 decimal places?
 * Secondly my latitude entry must be from [-90º to +90º] and my Longitude entry
   must be from [-180º to +180º]. Is there anyway I can validate these values?
 * Many Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/decimal-fields/#post-10079551)
 * You can change the precision of the decimal field by editing the field datatype
   in the database directly using phpMyAdmin. This post discusses setting up the
   datatype: [https://xnau.com/setting-up-a-currency-or-other-decimal-type-field/](https://xnau.com/setting-up-a-currency-or-other-decimal-type-field/)
 * You can enforce limits on the field values by adding “min” and “max” limits. 
   You do this in the field definition in the values parameter…something like:
 * `min::-90,max::90`
 * Take a look at the specs for HTML5 number input fields for the details on what
   attributes are available.
 *  Thread Starter [supernova42](https://wordpress.org/support/users/supernova42/)
 * (@supernova42)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/decimal-fields/#post-10080441)
 * Thanks Roland – did both of these and all works fine now.
    I have many members
   in my boat owners website. They put details of their boat on the website together
   with the latitude and longitude of where the boat is kept. I use these values
   to show placemarkings on a google map for each of the boats so that the distribution
   of boats throughout the world is shown. It looks very impressive. Many Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Decimal Fields’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [supernova42](https://wordpress.org/support/users/supernova42/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/decimal-fields/#post-10080441)
 * Status: resolved