How to get a CS field's HTML element for manipulation
You can get the html element that is shown on the page for a given CS field with the below jQuery line.
You have to use this JS code as when you use the CS field name in square brackets it gets the JS variable that holds the value and not the visual element in the script.
Code Syntax to get the HTML object in JS:
$('#' + getCSObject([CSFIELD]).name.replace('F','fv'))
Example to set the background colour of a field called "TheField":
$('#' + getCSObject([TheField]).name.replace('F','fv')).css( "background-color", "blue");
Article ID: 18, Created: November 20, 2015 at 10:15 AM, Modified: August 18, 2016 at 11:23 AM