Coin field mask

I am trying to create a Coin mask on amount field putting this on editfieldsdefs.php

‘displayParams’ =>
array (
‘field’ =>
array (
‘onkeypress’ => “$(this).mask(‘000.000.000.000.000,00’, {reverse: true})”,
),
),
but this code crashes the Opportunities module, but when i removed {reverse: true} the code worked, how can i put {reverse: true} without crashes the module???
Someone can help me?
Thanks!!!

Try

‘onkeypress’ => “$(this).mask(‘000.000.000.000.000,00’, {ldelim}reverse: true{rdelim})”,

Or

‘onkeypress’ => “$(this).mask(‘000.000.000.000.000,00’, {literal}{reverse: true}{/literal})”,
1 Like

I will try this. Thnks for reply!!

Worked!!! Thnks a lot!!