I am using HTML-table. I have prices in millions “2564897”, but i need “2 564 897”. Is it possible with trasform function? But I don´t understand the documentation, it is a big mystery for me…
I just need spaces between thousands and commas instead of decimal point. Do you understand me or is it possible?
Unfortunately this is a bit complicated. You will have to add the following custom transform.
The your shortcode is something like this: (change “money” to your field name)
[cfdb-table form="your-form" trans="money=my_money_format(money)"]
require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBPermittedFunctions.php');
function my_money_format($money) {
// number_format(number,decimals,decimalpoint,separator)
return number_format($money, 2, ',', ' ');
}
cfdb_register_function('my_money_format');