aukirk Posted July 4, 2014 Report Share Posted July 4, 2014 I have tried searching the forums, and can't seem to figure this out. How do I get the CSS styles placed in the header to change just one field? For example, if I have a field titled "GA_Campaign", the ID for that field seems to be putting a random string of characters at the end (i.e. InsertRecordGA_Campaign_04660113417). However, that random string of numbers changes each time the data form is reloaded. How would I set it so that the border for that field is 0px? Quote Link to comment Share on other sites More sharing options...
Jan Posted July 8, 2014 Report Share Posted July 8, 2014 Hello aukirk, There is the article, where you can find which will be ID of a field depending on the DataPage type. I hope it helps. Quote Link to comment Share on other sites More sharing options...
Jan Posted August 21, 2014 Report Share Posted August 21, 2014 Hello Aukirk, And one more thing - as far as I know, it is requires some additional code to find the cascading field by ID. So, if you work with a not cascading field and want to change, for example, color of the field, you can use the following code: <script type="text/javascript"> var textfield = document.getElementById("InsertRecordFIELDNAME"); textfield.style.color="#ff0000"; </script> But if the field is cascading, the following code will work: <script type="text/javascript"> var elems = document.getElementsByTagName("*"); for (var i=0, m=elems.length; i<m; i++) { if (elems[i].id && elems[i].id.indexOf("InsertRecordFIELDNAME") != -1) { var textfield = elems[i]; } } alert(textfield); textfield.style.color="#ff0000"; </script> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.