Field

PatKwi

New member
Trying to set a number format for a field and my function code does not seem to be working.

<?php
function dadabik_format_abv($value){
return number_format($value,1);
}
?>

In this case trying to make the field format with 1 decimal point.

This is the table- Items
Field - item_abv
int
nullable - YES

Form configuration screen shot attached, screen shot of php attached.


Is there an existing library of examples for these php functions for calculated fields and formatted fields? For Views?

Thanks.


Your current DaDaBIK version​

You are using DaDaBIK version 11.9-Elba enterprise, installed on 05-11-2023 (installation code: 1758861db3c5dd924a), the latest version of DaDaBIK is 11.9-Elba released on 03-23-2023

You are running the latest release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.

System info​

PHP Version: 7.4.30

mysql version: 8.0.30-0ubuntu0.20.04.2

Web server: Apache

Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36

URL installation: https://www.cityorchard.co/database/
 

Attachments

  • form_configuration_ITEMS-2.jpg
    form_configuration_ITEMS-2.jpg
    316 KB · Views: 2
  • form_configuration_ITEMS-1.jpg
    form_configuration_ITEMS-1.jpg
    314.3 KB · Views: 2
  • php formatting function one decimal.jpg
    php formatting function one decimal.jpg
    255 KB · Views: 2
Top