After inserting a decimal value (ie 3.14145) into a text field (any text field, in add or edit mode) the decimal gets lopped off and the displayed value is before the decimal point.
Anyone fixed this? Is this in the save() function in concrete/controller.php ?
well most stuff is an integer and gets converted as such.
if you have a block or another concrete5 added db table and thus field it is recommended by me to use either a N or F designation in your db.xml, otherwise mysql won't convert it to an integer which is a whole number.
I settled on type of N for my app dealing with numbers and money, not sure why at the time but that is what i did :) Float might be more applicable for storing pi
Don't you have to specify a size like 6.2 (six digits followed by two decimal places) when using N? The documentation for ADOXMLS recommends using a string type for decimals to avoid rounding errors. If only two decimal places are ever used, that shouldn't be a problem. An issue would only occur if two decimal places are specified for the field but a value with more than two decimal places is being stored in the field.
Has anyone found a way to store decimal values yet?
When using type="N" it creates a field type of "decimal(10,0)" which rounds off the decimal. Attempting to use something like type="N10.2" generates an mysql error: 1064 during the block install. I simply can't believe we have to settle on storing them as string values.