About us
ProcessMaker Inc. is the developer of the ProcessMaker Workflow & BPM Software Suite. Read more
amosbatto wrote: ↑Tue Jun 06, 2017 7:43 pmHi Amos,endangkusmayadi wrote:I have problem when it applied to textbox in grid, is it possible using jquery.masknumber.js to format number in grid??Endang, you can use this JavaScript code to set the thousands separator in grid fields:
Code: Select allvar 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: '.'}); });
zainab wrote: ↑Tue Apr 04, 2017 2:59 am Hello,Hi! can you help me out? i have this problem: viewtopic.php?f=41&t=736854&p=825048#p825048
Could you please export your dynaform's JSON code, in order to better debug your issue. Also when previewing the dynaform, use your browser's Developer tool and open the console log, check what you find in the console log, this might give you an idea what is wrong with your javascript if any. Also kindly attach the screenshot here if possible.
Is there any other javascript in your dynaform? Check if that is causing any error.
Looking forward to your response.
Best Regards,
Zainab Sabunwala
amosbatto wrote: ↑Tue Apr 04, 2017 2:10 pm Are you using a regular expression in the validate property to guarantee that it is a floating point value? If so, then clear your validate property.Hi Amos! Could you help me out here please? : viewtopic.php?f=41&t=736854
amosbatto wrote: ↑Wed Apr 05, 2017 8:28 pm The problem is that you are using a variable for your textbox which is float type. You need to change your variable type to string.When i write to mystring 1250000.00 then i get error
You can create a hidden field that uses the float variable. Then use JavaScript to copy between the two fields. For example, if the visible field has an ID of myString and the hidden field has an ID of myFloat:Code: Select all$("#myString").setOnchange( function(newVal, oldVal) { newVal = newVal.replace(",", ""); $("#myFloat").setValue(newVal); }); //copy value from hidden field to visible field when form loads: var val = $("#myFloat").getValue(); val = val.replace(/\B(?=(?=\d*\.)(\d{3})+(?!\d))/g, '_'); $("#myString").setValue(val);
Are you looking for a more intelligent approach to[…]
The 1Win Clone Script is a pre-built solution that[…]
Aviator Clone Script replicates the renowned Aviat[…]
From converting physical assets into digital asset[…]