表达式引擎:此表单已过期.请刷新并重试

Gio*_*Gio 3 expressionengine

我在Expression Engine中遇到了联系表单的问题.我正在使用文档中的代码,但在提交后我收到此错误:

This form has expired. Please refresh and try again.
Run Code Online (Sandbox Code Playgroud)

我的代码:

{exp:email:contact_form user_recipients="no" recipients="my@emailadress.com" charset="utf-8"}
    <h2>Support Form</h2>
    <p>
            <label for="from">Your Email:</label><br />
            <input type="text" id="from" name="from" size="40" maxlength="35" value="{member_email}" />
    </p>
    <p>
            <label for="subject">Subject:</label><br />
            <input type="text" id="subject" name="subject" size="40" value="Contact Form" />
    </p>
    <p>
            <label for="message">Message:</label><br />
            <textarea id="message" name="message" rows="18" cols="40">
                    Support Email from: {member_name}
                    Sent at:  {current_time format="%Y %m %d"}
            </textarea>
    </p>
    <p>
            <input name="submit" type='submit' value='Submit Form' />
    </p>
{/exp:email:contact_form}
Run Code Online (Sandbox Code Playgroud)

我正在使用Expression Engine 2.8.0.多谢你们!

小智 9

EE要求XID在表单中.您可以使用一个全局变量来生成XID哈希:

<input type ="hidden"name ="XID"value ="{XID_HASH}"/>

http://ellislab.com/blog/entry/putting-the-secure-in-secure-mode-forms