I have 3 fields on a form that I autofill using a lookup. There is no need for a user to click on them, tab to them, etc., and I want to prevent the selection of the field by mouse or when tabbing through the form. I found some JavaScript, but it does not work. Does anyone know what I can do to prevent a user from selecting the fields? Thank you.
Here is what I put in the JavaScript section of my form, FYI:
$('#q10 input').click(function () { return this .attr('unselectable', 'on') .css('user-select', 'none') .on('selectstart', false); }) $('#q10 input').focus(function () { return this .attr('unselectable', 'on') .css('user-select', 'none') .on('selectstart', false); }) $('#q10').attr('unselectable', 'on'); $('#q10').css('user-select', 'none'); $('#q10').on('selectstart', false);