How to exclude some fields or widgets from the custom CSS codes you hav

  • jafferalhamad
    Asked on August 23, 2016 at 12:00 PM

    How to exclude some fields or widgets from the custom CSS codes you have entered?

    In other words, If I have added some custom CSS codes, but I want them to apply on all fields and widgets except one or two, how is that possible?

  • Support_Management Jotform Support
    Replied on August 23, 2016 at 1:37 PM

    If your aim is to target all fields except one (or two) of them, you may first declare the CSS codes for all the fields in general, then add another set of CSS Codes for the fields to be excluded. Here's a quick example:

    Scenario: Change the font color of ALL labels to red except the Email field

    Demo: https://form.jotform.com/62354842998976

    CSS Codes used:

    .form-label {

       color: red;

    }

    #label_4 {

       color: black;

    }

    It's important to note that you should declare your codes for all the fields BEFORE you declare the specific fields to be excluded. What you're essentially doing is use the CLASS for all the fields then use the unique ID of the specific field to be excluded.

    Although this is a simple example, the same idea applies regardless if you're doing this on Jotform or not.

    Hope that answered your question.