1.7.2releasedNumber Field
Dedicated number storage
Clone URLhttps://github.com/symphonycms/numberfield.git
Add as a submodulegit submodule add https://github.com/symphonycms/numberfield.git extensions/numberfield --recursive
Compatibility
2.x.x | 2.1.x | 2.2.x | 2.3.x | 2.4.x | 2.5.x | 2.6.x | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.7.4 | 2.7.5 | 2.7.6 | 2.7.7 | 2.7.8 | 2.7.9 | 2.7.10 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
No | 1.5.1 | 1.5.1 | 1.6 | 1.6.1 | 1.7.2 | 1.7.2 | 1.7.2 | 1.7.2 | 1.7.2 | 1.7.2 | 1.7.2 | 1.7.2 | 1.7.2 | 1.7.2 | 1.7.2 | 1.7.2 | 1.7.2 |
Readme
Number Field
Input field that provides built-in number validation and numeric sorting.
Installation
- Upload the 'numberfield' folder in this archive to your Symphony 'extensions' folder.
- Enable it by selecting the "Field: Number", choose Enable from the with-selected menu, then click Apply.
- You can now add the "Number" field to your sections.
Datasource Filtering
The number field provides two additional datasource filtering methods:
1) Range filtering
You can easily filter by a numeric range on the number field on your datasource. Simply enter something like this:
10 to 20
This will return all entries that have a field value between 10 and 20. Spaces are optional.
Just like any other datasource filter, you can make these values dynamic:
{$url-lower-limit} to {$url-upper-limit}
This would let you pass through the upper and lower limit as url parameters. E.g. /products/?lower-limit=10&upper-limit=20
2) Less than or greater than
You can also use standard greater than or less than symbols in the filter value or you can use words. e.g.
> 20
greater than 20
This will return all entries that have a value greater than 20.
<= 20
equal to or less than 20
This will return all entries that have a value of 20 or less.
Version history
Symphony 2.5.x to 2.x.x
- PHP7 Compatibility for Symphony 2.x.x
Symphony 2.5 to 2.6.x
- Set 'entry_id' as unique
Symphony 2.5 to 2.6.x
- Support Symphony 2.5+
Symphony 2.3.2 to 2.4.x
- Update
ImportableField
support - Add Russian language
- Add support for filtering using symbols, <, >, <= and >=
Requires Symphony 2.3
- Symphony 2.3 compatibility
Symphony 2.1.0 to 2.2.x
- README updates to describe available datasource filtering
- Implement
processRawFieldData
function
Symphony 2.1.0 to 2.2.x
- New filtering support which is safer and more powerful.
X to B
,equal to or less than X
,less than X
and theirgreater than
variants are now included thanks to @jonathanh32. Old datasource filters will not work and will need to be resaved. - Minor code tidy up
Requires Symphony 2.1.0