Turn a Stock Photo into a Stunning Comment Form

contactme

Inspired by this great article, I got working. I found a nice picture on Flickr and this is the result. Now let me tell you, the article makes it look dead easy to get such a nice form. In reality, it is in fact not that hard, but it’s a lot of pixel hunting, trying out colors and positions. Especially since I wanted to integrate this with the incredible cForms plugin for WordPress.

I’m still not entirely happy, but for now, it’s good enough. Here’s how I did it (beware, it’s probably not for the HTML and CSS newbie):

  • I created my form in the cforms control panel. This form has been online for a while, I didn’t really change a thing.
  • The entire code for the form was copied to a local HTML file and I added the style sheet from Janko’s tutorial to it.
  • Using Firebug, I figured out which fields I needed and changed the correct names in the CSS file.
  • When I was happy, I created a new style in the cforms styling folder and selected that style to be used.
  • I also created a special WordPress template for the contact form. That way I could disable the normal heading.

The major caveat here, is that cforms only allows you to select one style for all your forms. So if you have multiple forms, I’m affraid you’re out of luck. You could put the style sheet link in your page template, I guess. But I haven’t tried it yet.

One more “to do” for my form is to correct the error handling and get rid of the extra white that is inserted when hovering over the fields. But I’m going to leave it like it is for now. This 5 minute project has already taken enough evenings as it is.

update: this form was featured on the previous Streamhead design. For now it has been replaced by a fairly generic version. When I get around to it, I’ll be replacing it with something even better.

If you liked this, why not share it with your friends?
    This entry was posted in Java and JavaScript. Bookmark the permalink. Both comments and trackbacks are currently closed.

    2 Comments

    1. Posted December 31, 2008 at 3:32 am | Permalink

      It looks like my form didn't survive the upgrade to WordPress 2.7. I'll fix it asap.

    2. Posted December 31, 2008 at 1:32 pm | Permalink

      It looks like my form didn't survive the upgrade to WordPress 2.7. I'll fix it asap.

    • Feedback or questions? Contact me right away.

      Comments have been disabled on my posts. Not because I don't want to hear from you, but because they were adding very little to the conversation (most of them were spam anyway). I do listen to you and try to keep as much posts as possible up-to-date and error free. So if you have a question, if something isn't working the way you hoped or you have general feedback, please use the contact form below. I guarantee an answer to every honest question or remark.
    • Get in touch
      1. (required)
      2. (valid email required)
       

      cforms contact form by delicious:days