Use ',' or '.' as decimal separator

Hi all,

There are some way to number fields accept either ‘,’ or ‘.’ as decimal separators?

Normally in Spain is used ‘,’ to separate decimals but using ‘.’ key from block num, and don’t works (I suppose because ‘.’ from block num is a ‘.’ not a ‘,’)

Some suggestions to accept both?

Regards.

Afaik, you cannot as these symbols are used in string number_format ( float $number , int $decimals = 0 , string $dec_point = “.” , string $thousands_sep = “,” )

You can accept the value as string though and then do a change of , to . or the other way around before converting it to number.

[QUOTE=aducom;34308]Afaik, you cannot as these symbols are used in string number_format ( float $number , int $decimals = 0 , string $dec_point = “.” , string $thousands_sep = “,” )

You can accept the value as string though and then do a change of , to . or the other way around before converting it to number.[/QUOTE]

Maybe is something more related to regional settings on O.S. I will check for this

a Dynamic mask setting for SC would be nice… maybe with globals.

well just saying =P.

Regards

As an alternative, you could get Spain to change.

Just kidding using my ScriptCase sense of humor.