Quantcast
Channel: WordPress.org Forums » [Contact Form 7] Support
Viewing all articles
Browse latest Browse all 49500

j05hr on "[Plugin: Contact Form 7] Styling 2 versions of CF7"

$
0
0

Hi,

I've got two forms on a site and for the styling of one of them I use <form action="#" method="post" class="contact"> so class="contact" to style it. What I want to do is be able to add this into one of the forms but not the other.

The only thing I've seen that adds a class to the form is this

// Add class to contact form
	add_filter( 'wpcf7_form_class_attr', 'your_custom_form_class_attr' );
	function your_custom_form_class_attr( $class ) {
		$class .= 'contact';
		return $class;
	}

But that adds it to all the forms, is there a simple way I can add <form class="contact"> to the one form?

Thanks

Josh

http://wordpress.org/extend/plugins/contact-form-7/


Viewing all articles
Browse latest Browse all 49500

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>