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

renaming files in a directory using python or R -

html - outline-style different in chrome compared to firefox and internet explorer -

ruby on rails - Carrierwave Timeout -