Skip to Content Skip to Menu

How to store and display decimal numbers in CB

  • sentix
  • sentix
  • OFFLINE
  • Posts: 106
  • Thanks: 7
  • Karma: 0
9 years 8 months ago - 9 years 8 months ago #263206 by sentix
I am completely lost, hope you might help:

In prev versions of CB there was a decimal field plugin. How can I replace this functionality in CB 2 as there is no decimal field anymore?

Versions: CB 2.7.2, J 3.10.6
Last edit: 9 years 8 months ago by sentix.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48674
  • Thanks: 8313
  • Karma: 1446
9 years 8 months ago #263229 by krileon
We don't have a decimal field plugin. I'm guessing you had some sort of 3rd party plugin installed to provide that. Best I can suggest is use CB Query Field to query for the field value and try using MYSQL functions to format it however you want. A code fieldtype is planned that works like query field except executes PHP that'd better help with this, but that's not yet available at this time.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • sentix
  • sentix
  • OFFLINE
  • Posts: 106
  • Thanks: 7
  • Karma: 0
9 years 8 months ago - 9 years 8 months ago #263248 by sentix
Thanks for your quick reply. For output the number, the query type would solve this but I need some sort of input validation ... Any idea for that?

Did you consider to support the native joomla form fields and the possibility to extend the form field by own classes? that would be great :-)

Versions: CB 2.7.2, J 3.10.6
Last edit: 9 years 8 months ago by sentix.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48674
  • Thanks: 8313
  • Karma: 1446
9 years 8 months ago #263250 by krileon

but I need some sort of input validation ... Any idea for that?

You could use CB Auto Actions and its Code action to output jQuery to add input masks to the input. Aside from that there's regex validation for the field, but that'll just error until they get the format right. We have an input mask jQuery plugin and it can be loaded by CB Auto Actions by loading the jQuery plugin "inputmask" (specifically it's github.com/RobinHerbots/jquery.inputmask ), but we don't currently utilize it.

Did you consider to support the native joomla form fields and the possibility to extend the form field by own classes? that would be great

No, CB has its entirely own API for handling fields as well as a base field class that we extend from.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

Moderators: beatnantkrileon
Powered by Kunena Forum