html - 表单提交时偶尔会生成 404 页面

标签 html forms wordpress http-status-code-404

我的表单有 2 个必填字段(电子邮件和消息)和 2 个非必填字段(姓名和号码)。当您只填写必填字段时,它提交得很好,但是当提交非必填字段时,它会生成 404。如果有任何相关性,我正在使用 wordpress。

<form id="question" action="thankyou" method="post">
    <p class="question-label">Type your email address here...</p>
    <input id="email" name="email" type="text"></input>

    <h3>Your Question...</h3>
    <textarea id="message" name="message"></textarea>

    <input id="submit" name="submit" type="submit" value="GO" />

    <p>If you would like us to call you please enter you Name and Contact Number here:</p>

    <p class="question-label">Name</p>
    <input id="name" name="name" type="text"></input>

    <p class="question-label">Contact Number</p>
    <input id="number" name="number" type="text"></input>
</form>

最佳答案

我相信这是因为您在“名称”输入中使用了保留关键字。尝试:

<input id="enq-name" name="enq-name" type="text"></input>

它应该可以解决您的问题。

关于html - 表单提交时偶尔会生成 404 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9978329/

相关文章:

javascript - 使用javascript在img中显示图像/jpeg

php - 想要将目录中的所有php文件渲染或生成为静态html

php - 如何通过从另一个下拉列表中选择值来填充下拉列表

forms - 交响乐 1.4 : Check if form has errors inside form class

javascript - jQuery 通过输入移动表行并更改 id/name

css - 根据 Angular 2 表单中分配的验证器标记必填字段的标签

html - 手机页脚宽度

jquery - 如何防止jquery mobile自动添加DIV?

php - 如何使用 php 创建 wordpress 密码哈希生成器?

arrays - 如何从多维数组更新 wordpress 选项