Rounding of fields in CMSB

2 posts by 2 authors in: Forums > CMS Builder
Last Post: June 10, 2011   (RSS)

By rjbathgate - June 9, 2011

Hey,

I have numeric values posted to my database, and I want to

a) keep the value posted in it's full format
b) display the value in CMSB rounded to 2.

I can easily display the rounded value on front end using
number_format($tableRecord['field'], 2);

But I was wondering if there was an easy way to set a field within a viewer/section editor to this same formatting.

Obviously I could format the value BEFORE posting it to the database, but I would prefer not to do that if there is an easy way to format the section editor.

Thanks
Rob