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

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -