This topic is locked
[SOLVED]

 Problem with numeric field

8/20/2020 8:17:40 PM
PHPRunner General questions
alac author


In the display on the edit page when applying formatting separated by thousands.





The field appears with two commas and the correct one would be: 9,999.99
Mysql return Ok

PHP number_format ($ value, 2, ',', '.');return Ok

View pages return Ok

Edit / Addition pagereturns Wrong!
Can someone help me ?

Sergey Kornilov admin 8/21/2020

If you upload it to Demo Account we can take a look. Hard to tell what exactly is wrong without seeing the project.

alac author 8/21/2020



If you upload it to Demo Account we can take a look. Hard to tell what exactly is wrong without seeing the project.


Thank you all!

You can solve it like this:





-- JavaScript OnLoad Event --



...
"et_ps",

"ds_ps",

"dc_ps"

];

for (i = 0; i < FormatarDigito.length; i++)

{

var ctrlFormatarDigito = Runner.getControl(pageid, FormatarDigito[i] );

ctrlFormatarDigito.setValue( number_format(ctrlFormatarDigito.getValue(), 2, ",",".") );

}