• Resolved Beef Supreme

    (@polymathy)


    Hello,

    I’m looking for a way to modify the CSS of a specific form with a specific id. I know you can add CSS classes to single fields, but is there a way to add CSS classes to forms? Primarily I thought there would be a way to select a specific form by its id in CSS, so I could do something like this:

    #form-number-1 .some-class{
    color: black;
    }
    #form-number-1 .some-other-class{
    background-color: red;
    }

    and so forth…

    Unfortunately there doesn’t seem to be a way to select the id of a single form in CSS, at least I couldn’t find one.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @polymathy

    Yes, that’s possible, you simply should pass an additional attribute to the form’s shortcode, called “class”, and it will be applied to the form tag, for example:

    [CP_CALCULATED_FIELDS id="1" class="my-form"]

    And now you can to refer to the form as: form.my-form{}

    Best regards.

    Thread Starter Beef Supreme

    (@polymathy)

    Thank you, that did exactly what I needed! 👍

    Plugin Author codepeople

    (@codepeople)

    Hello @polymathy

    It has been a pleasure.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Modify CSS of specific form’ is closed to new replies.