Home
The Toolkit for Online Communities
16684 Community Members, 1 member online, 2382 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : Ad_form currency widget

Forum OpenACS Q&A: Ad_form currency widget

Icon of envelope Request notifications

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