Because of the way that Zendesk generates the end-user drop downs, the input itself has three components and the main class for the input has no unique identifiers on the client side. To assign one to the field, you can generate an array of all of the drop downs in the form and assigned unique classes to each:
var dropDowns = document.getElementsByClassName("nesty-input");
The rest of it is handled in the CSS, the element won't be recognized by the CSS unless it is referenced with only the unique class you added, for some reason. This is what the CSS looks like:
border: 0px solid;
The result produces a beautiful read-only drop down where you can pre-pass the value of the field in the JS.
I hope this helps!
Please sign in to leave a comment.