0

"float" adds arrows to add "steps" and I find it annoying because it adds 0.00000001

<input class="form-control narrow" name="cash" id="cash" step="0.00000001" value="0" type="number">

as they are "steps" are small, well I understand that it is wrong to store money double (float is stored as a double) and should be decimal but "number" is now deprecated in Bolt.

What is the right way?

# possible field types in bolt:
# text - varchar(256) - input type text.
# integer - integer - Input field for integer numbers.
# float - double - Input field for floating numbers, stored as 'Double'.
# geolocation - text (65kb) - Input field for geolocation. Enter an address, and the location is geocoded to latitude/longitude coordinates
# imagelist - text (65kb) - Input type for imagelists. Add multiple images with a description. Useful for image sliders, galleries, etcetera.
# image - varchar(256) - image select/upload widget, stored as filename.
# file - varchar(256) - file select/upload widget, stored as filename.
# filelist - text (65kb) - Input type for a list of files. Including a description.
# video - varchar(256) - Video embed widget, stored as filename.
# html - text (65kb) - wysiwyg element.
# textarea - varchar(32768) - Simple, plain < textarea > field.
# markdown - varchar(32768) - Simple, plain < textarea > field, which is parsed as Markdown text.
# datetime - datetime - date and time selector widget.
# date - datetime - date selector widget.
# select - varchar(256) - select with predefined values
# templateselect - varchar(256) - select with template filenames
# checkbox - integer - checkbox-field which is 1 (checked) or 0 (unchecked)


# number (deprecated) - input type decimal(18,9), useful for storing number that need to be sortable
4

1 回答 1

0

您可以根据需要创建一个,在这里您可以找到文档:https ://docs.bolt.cm/extensions/customfields

于 2015-04-04T19:06:21.323 回答