Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter panzeleny

    (@panzeleny)

    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…

    Thread Starter panzeleny

    (@panzeleny)

    I just need spaces between thousands and commas instead of decimal point. Do you understand me or is it possible?

    Plugin Author Michael Simpson

    (@msimpson)

    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');
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Thousands separator and decimal point’ is closed to new replies.