Questions and discussion about using ProcessMaker: user interface, running cases & functionality

Moderator: amosbatto

#825048
Hello everyone.

I'm trying to set a currency format (2.000.000,00) to a textbox in a grid. I saw a post here: viewtopic.php?t=709332

I follow this code: https://wiki.processmaker.com/3.0/Addin ... orm_Fields
Code: Select all
var gridId = "orderList"; //set to ID of grid
var fieldId = "amount"; //set to ID of text field inside grid

//set the thousands separator in all existing rows when the Dynaform loads:
var nRows = $("#"+gridId).getNumberRows()
for (var i = 1; i <= nRows; i++) {
    $("[id='form["+gridId+"]["+i+"]["+fieldId+"]']").maskNumber({decimal: ',', thousands: '.'});
}

//set the thousands separator in newly added rows:
$("#"+gridId).onAddRow(function(aNewRow, oGrid, rowIndex) {
    $("[id='form["+gridId+"]["+rowIndex+"]["+fieldId+"]']").maskNumber({decimal: ',', thousands: '.'});
});
But when i run the preview i have this error: "Cannot read property 'decimal' of undefined" that i don't know how to solve.

I'm working with bitnami windows installation.
PM: 3.3.3 CE
I add the process when is the form (just 1 task - 1 form) so anyone can give me a solution.

This is the error that show :
error_format.png
error_format.png (50.16 KiB) Viewed 742 times
Attachments
(47.67 KiB) Downloaded 10 times
#825115
It looks like jquery.masknumber.js has problems in ProcessMaker.

This code example works in PM 3.3.4 Enterprise, but it doesn't work in PM 3.3.8 Community. Both versions use jQuery 1.11.1. Maybe it is some difference between the Community and Enterprise Editions.

I looked at the code in jquery.masknumber.js, but I couldn't figure out what is the problem.

Can you import the code example and tell me if it works in your installation of PM?

We will probably have to use a different library.
#825129
amosbatto wrote: Wed Jun 26, 2019 1:17 am It looks like jquery.masknumber.js has problems in ProcessMaker.

This code example works in PM 3.3.4 Enterprise, but it doesn't work in PM 3.3.8 Community. Both versions use jQuery 1.11.1. Maybe it is some difference between the Community and Enterprise Editions.

I looked at the code in jquery.masknumber.js, but I couldn't figure out what is the problem.

Can you import the code example and tell me if it works in your installation of PM?

We will probably have to use a different library.
Hi Amos!

Thank you for your answer!

I just did it but i got the same error. It just happend with price and handling fields. I think that the problem is with the fields that needs decimal, because the quantity field works just fine. I don't know what to do :(
error_format3.png
error_format3.png (56.73 KiB) Viewed 689 times
error_format2.png
error_format2.png (55.49 KiB) Viewed 689 times
#825155
I found another solution that should work. See:
http://igorescobar.github.io/jQuery-Mas ... /docs.html

Download this file:
(7.99 KiB) Downloaded 15 times
Place this file in your workflow/public_html directory.
Then in your "external libs" property of your dynaform, add: jquery.mask.min.js

Then you can use the following JavaScript in your Dynaform:
$("#yourFieldID").getControl().mask("###.###.###.###.##0,00");

This worked in PM 3.3.8 Community for me.

Would like to know why the due date turns red even[…]

Hi Amos Thanks for your reply i've checked using […]

ExtraRest Installation Issues

I have exactly the same issue importing a custom p[…]

Blockchain

Hi guys. Recently, I began to study blockchain and[…]