Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<script>
jQuery(document).ready(function($) {
"use strict";
/* Format link phone number */
$("#field_devdir_country_code, #field_devdir_primary_contact_phone").on("change", function() {
var link_number = $("#field_devdir_country_code").val() + $("#field_devdir_primary_contact_phone").val();
$("#field_devdir_link_phone_number").val( link_number.replace(/\D/g,'') );
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment