WordPress.org

Ready to get started?Download WordPress

Forums

Custom Contact Forms
Request: more flexible CSS in CCF plugin (2 posts)

  1. Erik de Vries
    Member
    Posted 3 years ago #

    The Custom Contact Form uses style definitions inside the body tag.
    These definitions cannot be overridden. Look at the source code of a page where the CCF is placed. You'll see what I mean.

    e.g. There is a definition for the label style. This is cascaded under the #form-1-[10-digit number] selector. E.g.:

    #form-1-1292242762 label { padding:0; background-color:inherit; margin:5px 5px 5px 0; display:block; color:#333333; width:200px; font-size:1em; }

    I would change this to something like:

    #form-1-1292242762 label { padding:0; background-color:inherit; margin:5px 5px 5px 0; display:inline-block; text-align: right; color:#333333; width:200px; font-size:1em; }

    However, the 10-digit number is generated dynamically. So there is no way I can specify label styles, not even in the custom html I can add in the Form Display Code.

    Would it be possible to change this style block so that the #form-1 selector doesn't get the random 10-digit number but just keeps a fixed name? That way I could override this css by placing a style definition in the custom code. Since this custom code is placed after the generated style block it would override the previous definitions, provided I could specify the same selectors.

    Isn't it sufficient to make the selector unique by just adding the ranking number? #form-1 #form-2 #form-3 etc.

    This would give this nice plugin the flexibility I would like.

    (oc I could hack the php so the random number is not added hehe)

    e-

  2. Taylor Lovett
    Member
    Plugin Author

    Posted 3 years ago #

    The dynamic number is so the same form can be included on a page more than once. I definitely understand your request. I'll try and do something about that in version 4.1.0 which will be released in the next few weeks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic