在contenttype.yml中,字段类型是用来存钱吗?

时间:2014-09-12 23:32:14

标签: bolt-cms

"浮动"添加箭头以添加"步骤"我发现它很烦人,因为它增加了0.00000001

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

因为他们是&#34;步骤&#34;很小,我知道存钱双是错的(浮点数存储为双倍)并且应该是十进制但是&#34;数字&#34;现在已在博尔特中弃用。

什么是正确的方法?

# 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

1 个答案:

答案 0 :(得分:0)

如果需要,您可以创建一个文档:https://docs.bolt.cm/extensions/customfields