Tailor field type number - float is getting interger

I have this tailor fields:

    map_lat: 
        label: Karten Marker Breitengrad
        type: number
    map_long: 
        label: Karten Marker Längengrad
        type: number

As soon as I reload my saved floats, they get rounded up. What am I doing wrong?

Well, I now just went into the DB and changed the fields map_lat and map_long from INT to DECIMAL.

But it would be nice, if there’d be possibility to define that per field, like:

map_lat: 
        label: Karten Marker Breitengrad
        type: float

EDIT: sorry, just saw it’s about Tailor.

Take a look at your migration files in

plugins\your_author_name\your_plugin\updates\some_file_to_create_or_update_your_table.php, you probably had:

$table->integer('your_field')

instead of :

$table->decimal('your_field', 10, 2)

Take a look to the Available Column Types when migrating.

Database: Migrations - Laravel 9.x - The PHP Framework For Web Artisans

1 Like

Hello, I would like to know if there is some progress. Today is year 25 and Tailor number filed does not support decimals.
Please, are you plannig to make support for numbers with decimal with something better than text type field? I think a lot of people use decimal numbers in Tailors.
Thank you!

I also support the question, will work with decimal numbers be implemented or will a text field with its shortcomings be used?