[SOLVED] custom orderby textfields by num and decimal

More
10 years 5 months ago - 10 years 5 months ago #57153 by ggppdk
I am testing this v3.0.9-dev with a fix,
but also look at the changes for text field !

Download here (! BETA !):
github.com/FLEXIcontent/flexicontent-cck...eases/tag/v3.0.9-dev

Also see pictures for configuring the text field here:
github.com/FLEXIcontent/flexicontent-cck/issues/284

Fixes
Fixed fieldgroup field mixing field values in category view when custom HTML parameter is used
Fixed item list ordering by custom field as decimal
Fixed (v3.0.8 bug) 'Edit' being prepended in browser window title in item view if page heading parameter is active
Fixed (v3.0.8 bug) a broken unneeded span in the display of fieldgroup field display
Fixed form submission not triggering on-submit events e.g. jQuery inputmask needs this to unmask decimals and to unmask currency, so that e.g. currency character is not submitted or so that comma radix point is converted to dot for consistent DB storing of decimals

New features
Text field: easier to configure custom types, ONLY set 1 parameter instead of 3 (server-side validation and filter value comparison is now automatically set)
Text field: added more inputmask types (decimal with comma radix, 3 percentage types, euro currency, and a few more),
Text field: proper storage handling of currency and decimal, percentage, this is done by unmasking them on-SUBMIT and storing them as decimals in DB without any extra characters
Text field: improved custom output of values (viewing) more parameters for numbers
Text field: added option for custom PHP code to format the output values

Changes
Replaced deprecated (JDatabase function) query() with execute()
Updated jQuery inputmask to 3.2.0
Forced backend item preview links to switch to the language of the item, by including lang variable in the URL


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!
Last edit: 10 years 5 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #57173 by germany_bw
I create a testpage on the same server by the original website and upgrade from 3.07 to 3.09. I red your notices on GitHub.

I´m afraid the result is not better.

I tried some configs:

- 110:decimal:asc, Server-Side-Validation:Decimal, no masking,
- 110:decimal:asc, Server-Side-Validation:Decimal, custom mask, (radixPoint:',', digits:2, digitsOptional:false / true, allowPlus:false, allowMinus:true,)
- 110:decimal:asc, Server-Side-Validation:Decimal, Decimal (radix:

Wrong results with values <1,00 and >1,00.

By 110:num:asc the results are ok, but ->2<-3,12 of 23,12 will be ignored furthermore, like the value 23,12 is 3,12 or 12,14 is 2,14.

Sry, do you have a config for this? If you need and want I could give you an account for the testpage.

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago - 10 years 5 months ago #57174 by ggppdk
Hello

please resave the items

it will save the decimal with radix DOT but display them with radix COMMA

-- during item form saving inputmask UNMASKING is done that:

removes currency character
convert decimal to dot format and removes thousands separator
removes percentage sign

this way consistent storing of decimal is achieved, that allows
- sorting and
- filtering


edit the 'text/number' field and
- in Editing TAB set input mask / validation to Decima with RADIX Comma
it will set
- in viewing TAB configure display of Decimal with Radix Comma


-- Also re-download the v3.0.9-dev , a test message was forgotten in item form



-- TODO (not done yet):
Display of decimals in filters as
currency / decimal with comma / percentage


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!
Last edit: 10 years 5 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #57185 by germany_bw
Hello

Issue is solved:) The order is correct "< 1,00" and ">1,00":) and the results will be showed by radix COMMA:)

but resaving by inputmask "unmasking" e.g. "0,45" saved to "0"!? I simply saved to "0.45".

Thank you for your help:)

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save