Wordpress Contact Form 7 in a hidden div.

Posted by Luke on Stack Overflow See other posts from Stack Overflow or by Luke
Published on 2010-05-22T14:34:30Z Indexed on 2010/05/22 14:40 UTC
Read the original article Hit count: 172

Filed under:
|
|

Hi there,

I'm using Contact Form 7 on Wordpress. I have it set up so the upload appears in the 3rd of three divs that hide and show depending on a clicked link.

Everything is fine except when I click submit it hides the uploads div and shows the first div again.

The form is submitting fine and you see a message that it has sent if you navigate back to the uploads section.

Is there any way to keep the div you're in open and keep the rest hidden on submit?

This is the code i'm using for hiding and showing. I'm sure it's not perfect but it works.

// My Files

function basic_myfiles($atts, $content = null) { return '' . $content . ''; } add_shortcode("myfiles", "basic_myfiles");

// Sound Library function basic_soundlib($atts, $content = null) { return '' . $content . ''; } add_shortcode("soundlib", "basic_soundlib");

// Uploads function basic_uploads($atts, $content = null) { return '' . $content . do_shortcode( '[contact-form 4 "Client Upload Form"]' ) . ''; } add_shortcode("uploads", "basic_uploads");

Thanks

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about form