2

我正在尝试让 Formmail 表单重新定向回它自己的页面。例如,如果我在页面http://www.rightfittech.com/paincenter/contact-us.html上,我希望重定向返回到http://www.rightfittech.com/ paincenter/contact-us.html,这是同一页面。

我疯狂地搜索谷歌,没有任何有价值的结果。论坛一直说要创建一个隐藏的输入字段

但这不起作用!

我的代码在下面,注意我没有修改formmail,除了电子邮件地址!

<form action="http://www.rightfittech.com/paincenter/formmail.php" name="Contact" method="post"
id="form1">
             <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER" >
             <input type="hidden" name="redirect" value="http://www.rightfittech.com/paincenter/contact-us.html"/>
             <input type="hidden" name="recipients" value="robertmyrick@hotmail.com" >
             <input type="hidden" name="mail_options" value="FromAddr=robertmyrick@hotmail.com" > 
             <input type="hidden" name="subject" value="New Contact" >
          <div class="wrapper row-2">
            <div class="col-1">
              <div class="form">
                <label>First Name:</label>
                <input type="text" />
              </div>
              <div class="form">
                <label>Last Name:</label>
                <input type="text" />
              </div>
              <div class="form">
                <label>E-mail:</label><br/>
                <input type="text" />
              </div>
              <div class="form">
                <label>Phone Number:</label>
                <input type="text" />
              </div>
            </div>
            <div class="col-2">
              <div>
                <label>Enter Your Message:</label>
                <textarea cols="1" rows="1"></textarea>
              </div>

              <div class="wrapper">
              <div class="alignright" style="float:left">
              <a href="#" class="link2" onclick="document.getElementById('form1').reset()"><em><b>Clear</b></em></a>

              <div style="width:20px; float:left">&nbsp;</div>

              <a href="#" class="link2" onclick="document.getElementById('form1').submit()"><em><b>Submit</b></em></a></div>
                                                            </div>
        </form>
4

1 回答 1

3

尝试设置值good_url而不是redirect.

像这样:

<input type="hidden" name="good_url"
       value="http://www.rightfittech.com/paincenter/contact-us.html"/>
于 2012-01-19T00:01:16.180 回答