Using CSS to Target Form Fields

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000099958-using-css-to-target-form-fields

Previously to show/hide form fields, complicated PHP in specific areas of code was used.


Now we've made it easier to control by including a class to the <body> element that will be used.


This CSS Class will allow targeting specific rows of front-end display based on the system name or database variable of a field:




With this class it will be easier to target the form field using CSS in the Design Settings rather than having to go into specific sections of the code and use PHP every time.


This new class applies for all forms fields, this includes default and custom fields.


Example Using the CSS Method


Target the element or area that will be modified. In this example, the Background Color of the form field:




After applying the CSS, only the "Company Name" field has a different background color: