Ruby on rails get mac address -


i want mac address user in form, don't know there simple way it, or have using 6 text field.

update:

jquery

$(document).on('ready page:load', function() {    $('.field-id').mask('00:00:00:00:00:00', {'translation': {0: {pattern: /[a-z0-9]/}}}); 

});

form view

<%= f.text_field :comp_id, class: "field-id" %> 

i don't understand why not working

you can use jquery client-side input mask. here jquery plugin this: http://igorescobar.github.io/jquery-mask-plugin/

in case of mac address, field masking might this:

$('#field-id').mask('00:00:00:00:00:00', {'translation': {0: {pattern: /[a-z0-9]/}}}); 

Comments

Popular posts from this blog

java - OnDragListener Fires Several Times? -

c# - ajax - How to receive data both html and json from server? -