Title: contact 7 &amp; html code
Last modified: August 19, 2016

---

# contact 7 & html code

 *  [gareth gillman](https://wordpress.org/support/users/faevilangel/)
 * (@faevilangel)
 * [16 years ago](https://wordpress.org/support/topic/contact-7-amp-html-code/)
 * Hey peeps!
 * Is it possible to hack the contact 7 forms to include custom html code? I need
   to add a different submit button…
 * cheers

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

 *  [flamenco](https://wordpress.org/support/users/flamenco/)
 * (@flamenco)
 * [16 years ago](https://wordpress.org/support/topic/contact-7-amp-html-code/#post-1505806)
 * You certainly could hack Contact Form 7’s plugin code. But what I would do would
   be to leave the HTML alone, and style with CSS. You could use all kinds of style
   touches, ranging from subtle enhancements to using a different image. Here are
   some nice ideas for that:
 * [http://www.456bereastreet.com/lab/styling-form-controls-revisited/submit-button/](http://www.456bereastreet.com/lab/styling-form-controls-revisited/submit-button/)
 * [http://cssbutton.com/forms/](http://cssbutton.com/forms/)
 * That’s my preference, as I’d rather hack CSS than PHP. 🙂
 * Cheers, Dave
 *  Thread Starter [gareth gillman](https://wordpress.org/support/users/faevilangel/)
 * (@faevilangel)
 * [16 years ago](https://wordpress.org/support/topic/contact-7-amp-html-code/#post-1505906)
 * Hey Dave
 * That won’t work here as I can’t add a class / ID to the submit button, and using
   the input css tag means all my inputs would be the same as the submit button.
 * Looks like I am going to havw to hack the php….
 *  Thread Starter [gareth gillman](https://wordpress.org/support/users/faevilangel/)
 * (@faevilangel)
 * [16 years ago](https://wordpress.org/support/topic/contact-7-amp-html-code/#post-1505907)
 * I have just got it working, I had to hack the plugin file submit.php, and edit
   the following line
 * $html = …
 * I jsut added a class and removed the value.
 * It’s not advisable if you’re using different forms on one site, but if all the
   forms are the same then it’s the easiest way.
 *  [flamenco](https://wordpress.org/support/users/flamenco/)
 * (@flamenco)
 * [16 years ago](https://wordpress.org/support/topic/contact-7-amp-html-code/#post-1505915)
 * Good show! You’re more of a coder than I am, probably.
 * It’s still usually possible to use CSS styling on your form with no added class
   or id on the button. Well-constructed themes have all kinds of classes and ids
   on DIV’s which surround your content, and they are automagically populated with
   material that shows that unique item. As a very simple example you’ll see things
   like:
    `<div id="post-11"...`
 * This is also super handy for styling things where the client will say “I want
   this cuckoo color and cuckoo border, but only on this one page”.
 * Another benefit of not touching PHP code is that no need to worry about borking
   your change when you upgrade.
 * So it’s very quick and easy to style only that one form if you’re handy with 
   the CSS cascade. That’s the beauty of WP… so many ways to solve a problem.

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

The topic ‘contact 7 & html code’ is closed to new replies.

 * 4 replies
 * 2 participants
 * Last reply from: [flamenco](https://wordpress.org/support/users/flamenco/)
 * Last activity: [16 years ago](https://wordpress.org/support/topic/contact-7-amp-html-code/#post-1505915)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
