Forum OpenACS Q&A: Ad_form currency widget

Collapse
Posted by Vince T on
hi,

im having a bit of trouble with the currency widget for ad_form...

if for example i enter a .1 on the 'cents' field the widget converts to sql as .01 if i enter the complete .10, it converts it fine.

my ad_form definitions look like this:

  {rate:currency,optional,to_sql(sql_number)
        {label "Base Rate"}
        {format {$ 2 . 5"}}

I intentionally put in 5 decimal places as i need this level of currency. But I also tried it with xx . 2 format.

Am I using the widget incorrectly? Is there a numeric widget I can use?

Thanks