2015-10-20 67 views
1

一直在努力与这一个小时,任何帮助,非常感谢。联系表7不工作内Bootstrap模态

我使用的是WordPress,带有我创建的自定义主题和Contact Form 7插件。

我试图做一个登陆页面,用户点击第一个按钮,被带到一个模式内的表单,并在成功完成表单后,被定向到下载链接。

表单在模态之外或不同页面上完美工作。

但是在模态中,表单在完成后无法将用户重定向到PDF文件。

提交后,模式关闭,页面刷新与链接http://example.com/landing/#wpcf7-f188-o1,而不是去PDF文件。

我有一种感觉,它可以固定与JS,但我从来没有涉足它,甚至不知道哪个文件进行调查或坦率地从哪里开始。

感谢您提前提供任何帮助。

PS。这里有一个链接到直播现场:http://goo.gl/XBaOs3

<div class="vertical-center"> 
     <div class="container"> 
      <div class="row text-center"> 
       <div class ="col-md-offset-3 col-md-6 opt-modal cta-container-center"> 
        <h1 class="headline">7 Must-Have Tools for Real Estate Companies</h1></br> 
        <button type="button" class="btn btn-primary btn-lg btn-block cta-link" data-toggle="modal" data-target="#myModal">Download Now</button> 
        <!-- Modal --> 
        <div id="myModal" class="modal modal-vcenter fade" role="dialog"> 
         <div class="modal-dialog"> 
          <!-- Modal content--> 
          <div class="modal-content"> 
           <div class="modal-header"> 
            <img class="modal-header-image" src="http://beltadigital.com/wp-content/uploads/2015/10/leadbox-header-image-placeholder.png"> 
           </div> 
           <div class="modal-body"> 
            <div class="landing-form"> 
             <?php 

              $landing_form = new WP_Query('pagename=landing-form'); 
              $landing_form -> the_post(); 

              the_content(); 

             ?> 
            </div> 
           </div>  
          </div> 
         </div> 
        </div> 
       </div> 
      </div> 
     </div> 
    </div> 

编辑

,联系方式似乎并不里面WordPress的时候就情态动词很好地工作。

我只能想到的解决方法是硬编码并上传到FTP服务器。

+0

http://contactform7.com/redirecting-to-another-url-after-submissions/ – rnevius

回答

-1

你有你为什么做这样尝试

<?php echo do_shortcode('contact form 7 shortcode'); the_content(); ?> 

取而代之的是

<?php 
    $landing_form = new WP_Query('pagename=landing-form'); 
    $landing_form -> the_post(); 
    the_content(); 
?> 

有没有具体的原因是什么?

+0

不幸的是,这并没有解决问题。我不知道任何其他方式,但感谢那。 –