UPDATE 12-Jun-2014: Partial Solution found - See
Modified Text Field Plugin with number formatting
post below.
I'm working on a new Joomla! (3.x and later) project.
I've chosen to try out FlexiContent - looks very promising - Thank you.
This is my first forum post - I've searched the Forum and elsewhere for a solution to the following, but no success.
Suggestion:
In addition to the existing "Text (number/time/etc/custom validation" Field type,
I am suggesting you provide a new single property "Numeric" Field type which stores a number as a PHP Floating Point number (rather than a string),
and provides 'Display Parameters' supporting (as a minimum) all four parameters of PHP number format (refer
www.php.net/manual/en/function.number-format.php
),
or, perhaps for more flexibility,
the PHP money_format (refer:
www.php.net/manual/en/function.money-format.php
),
and,
with input validation of the number types/representations (refer
en.wikipedia.org/wiki/List_of_types_of_numbers
) supported by this suggested new FlexiContent 'Numeric' field.
For example;
Positive/Negative numbers (allow/disallow)
Natural Number (zero not allowed),
Integer Number (Natural Numbers including zero),
Decimal (Rational Number).
My project 'Numeric Field' requirements are:
(a) Input/Store a Decimal number with values before and after decimal point, i.e.;
100000.001
100000000.00001
1.1
(b) validate number input is a valid decimal number,
(c) Display 'user friendly' 'formatted number' on output using different 'decimals' and thousands_sep
i.e.;
input & validate a decimal number with value = 100000.0004
then display number as;
100,000.00 or
100.000.00 (Spanish Notation) or
100 000,00 (French Notation) or
100,000.0004 (PHP money_format with; suppress the currency symbol and Left precision = 4n)
(d) Create a 'filter/Smart Search' that can operate on FlexiContent Floating Point field 'Numeric' number ranges as opposed to Text string numbers;
i.e Search on Items with "Numeric" Field type; min value = 0, max value = 10,00
Why?
Essential to Input/Store a Floating number (rather than a 'string') for formatted display of numerics such as Price, Length, Area, Volume, Weight, Ratio, etc, and providing 'filter/Smart Search' on Floating number value ranges in 'types' such as catalog, directory, etc.
Does this make sense to you?
Regards - Mark
Also see;
www.flexicontent.org/forum/index.php?f=20&t=7484&rb_v=viewtopic
www.flexicontent.org/forum/index.php?f=30&t=5227&rb_v=viewtopic
www.flexicontentcck.org/forum/index.php?...=2271&rb_v=viewtopic
code.google.com/p/flexicontent/issues/detail?id=230
www.flexicontent.org/forum/index.php?f=3...rt=10&rb_v=viewtopic
www.flexicontent.org/forum/index.php?f=3...rt=10&rb_v=viewtopic
www.flexicontent.org/forum/index.php?f=2...b_v=viewtopic#p33253