Is there a jquery that can remove any non numeric character in a single-line field after a lookup rule? i've tried googling and came up with this, however, it doesnt seem to remove any non-numeric characters.
// Wait until the form is fully loaded
$(document).ready(function () {
// Replace 'Field123' with your actual field ID from the Forms designer
var $field = $('.ssn input');
// Listen for input changes in real time
$field.on('input', function () {
var originalValue = $(this).val();
// Remove all non-numeric characters
var numericValue = originalValue.replace(/[^0-9]/g, '');
// Update the field only if it changed
if (originalValue !== numericValue) {
$(this).val(numericValue);
}
});
});