Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a page outside of my standard Wordpress site and I want to use my header and footer on it so it looks like it's part of my site. In my footer, I have a CF7 form that I'm trying to replicate. However, in the action, it says /#wpcf7-f1-t1-o1 however I'm not sure where that is in the plugins folder. Anybody know? Or is there an alternate action I can put in there?

share|improve this question
add comment

2 Answers

That action means "post the form back to the website root". Your website root is the very 'top level' of your domain, for example http://www.example.com/.

The hash indicates the point in the document to jump to - in this case, I'm betting the ID of the form is wpcf7-f1-t1-o1?

You shouldn't need to alter this. Even though the form is on a page outside of WordPress, when the user clicks submit, they'll get sent back to your homepage where the form can be handled.

share|improve this answer
    
I tried leaving it alone and also adding my site url to the front of it http://mysite.com/#wpcf7-f1-t1-o1 and when I click on submit, the loading gif just keeps spinning. –  jwp Mar 13 '11 at 3:23
    
Sounds like a JavaScript issue - I'd advise removing any scripts to do with the form. Admittedly, you won't benefit from client-side validation on first submit, but you'll save yourself a lot of headaches! –  TheDeadMedic Mar 13 '11 at 3:39
add comment

A possible replacement for that action would be the $_SERVER['REQUEST_URI'] variable. This basically guarantees a post-back to the current page. Just put it right in front of the /# in the action attribute.

<form method="post" action="<?php $_SERVER['REQUEST_URI']; ?>/#wpcf7-f1-t1-o1"...

Otherwise, what #wpcf7-f1-t1-o1 is referring to is just the ID of an element on the page to act as an anchor, so when the page loads, it pops right down to that element.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.