Set "Inputmode" on a Currency Field to a Decimal
Please note that this is now available as a plugin for easier installation. While you can use this document as a reference, the recommended method to add…
- Not yet re-checked
- Classic builder
Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.
This customization can be beneficial for many reasons. For example, it can be helpful on an app targeted purely at mobile users.
Step 1
Copy & paste this code into the footer of the site:
<script src="https://cdnjs.cloudflare.com/ajax/libs/inputmask/4.0.9/jquery.inputmask.bundle.min.js"></script>
Step 2
Find the ID of the field you wish to use:
Step 3
Add the following code to the JavaScript of the page, be sure to change the field ID to the ID from step 2.
var flag = false;
function checkFlag() {
if (flag === false) {
if ($(’#field0DzjGaNYp1’).html() !== undefined) {
flag = true;
}
window.setTimeout(checkFlag, 100);
} else {
var im = new Inputmask(‘99.99’);
im.mask($(’#field0DzjGaNYp1’));
}
}
checkFlag();
Original Community Post:
Was this page helpful?
Something wrong or missing on this page? Tell us.