I have a form field in a template in a simple module that's defaulting to a currency type, which is find: It's configured in the template as follows:
'from_price' => array('type' => 'currency', 'currency' => '£'),
it's save to the database as JSON correctly
[{...,"from_price":"12,399.00",...
when the module re-renders the value it appears as:
"From price £12.00"
I've checked the documentation and it indicates the separator can be moved, I've tried 0 and 10, 0 didn't make a difference and 10 hung the page.
How should currency be handled in JSON?
We are using the develop branch version of Fuel
Regards
David
Comments
'type' => 'currency', 'currency' => '£'
and, thinking that 0 would disable the separator
'type' => 'currency', 'currency' => '£', 'separator' =>0
Then separator 10, trying to move the separator out of the range of numbers the field would be used for
'type' => 'currency', 'currency' => '£', 'separator' =>10
'type' => 'number', 'before_html' => '£', 'decimal' => TRUE