I’m trying to properly format numbers that are being displayed in an edit template. As an example, in MySQL the field is defined as DECIMAL(4,2). The saved value is 9.20.
In the view template, I have:
$this->Number->format($race->dial, [‘places’ => 2])
which correctly displays 9.20
However, in the edit template, I have:
which incorrectly displays 9.2
I have tried adding a number of options to the control to properly mask the field but none seem to work. Whether is it 2 or 3 decimal points, I need to make sure it displays the trailing zeros.
I feel like I’m missing something real simple here but I’m struggling. Any suggestions on how to display all decimal places?