表单重定向到同一页面,但显示不存在

Jas*_*ick 0 html forms wordpress

你好,我有一个关于 html 表单的非常奇怪的问题。我正在使用 Wordpress,并创建了自定义 html 表单。当我提交表单时,它会将我重定向到同一页面网址,但显示该页面不存在。

\n\n

我的表格:

\n\n
<form action="" method="post">\n                    <div class="form-group">\n                        <input type="text" name="name" class="form-control input-text" placeholder="Va\xc5\xa1e jm\xc3\xa9no a p\xc5\x99\xc3\xadjmen\xc3\xad" />\n                        <div class="validation"></div>\n                    </div>\n                    <div class="form-group">\n                        <input type="email" class="form-control input-text" name="email" placeholder="V\xc3\xa1\xc5\xa1 e-mail" />\n                        <div class="validation"></div>\n                    </div>\n                    <div class="form-group">\n                        <input type="text" class="form-control input-text" name="subject" placeholder="P\xc5\x99edm\xc4\x9bt zpr\xc3\xa1vy" />\n                        <div class="validation"></div>\n                    </div>\n                    <div class="form-group">\n                        <textarea class="form-control input-text text-area" name="message" rows="5" placeholder="Va\xc5\xa1e zpr\xc3\xa1va pro n\xc3\xa1s..."></textarea>\n                        <div class="validation"></div>\n                    </div>\n\n                    <div class="row">\n                        <!-- Google reCAPTCHA widget -->\n                        <div class="col-lg-8 col-sm-8">\n                            <!-- recaptcha here -->\n                        </div>\n                        <div class="col-lg-4 col-sm-4" style="padding-right: 0; padding-left: 0;">\n                            <div class="text-center" style="margin-right: 7px;"><button name="submit" style="width: 135px; height: 75px; padding:0 !important;" type="submit" class="input-btn">Odeslat</button></div>\n                        </div>\n                    </div>\n                </form>\n
Run Code Online (Sandbox Code Playgroud)\n\n

我试图隐藏我所有的 php 代码,也隐藏谷歌验证码,但没有任何效果,问题出在其他地方。我的action也是空的,只是设置方法。

\n\n

有什么问题吗,有什么建议吗?

\n

Ali*_*ani 5

您必须将字段名称更改name="name"为其他名称。欲了解更多信息,您可以在这里阅读 https://wordpress.stackexchange.com/questions/11749/why-when-i-submit-a-form-in-wordpress-it-loads-a-404-page-though-url -是正确的