首先,我正在使用
联系表格7
和
非常简单的验证码
我的表单位于以下网址: mysite.com/#summary
当我点击提交时,表单会将我重定向到此处: mysite.com/#wpcf7-f5514-p986-o1 ,而不是正确提交表单。
这是我的网络标签:
如您所见,#wpcf7-f5514-p986-o1 是与ajax一起发送的 _wpcf7_unit_tag 的值以及表单的操作网址(如你可以在下面的图片中看到):
在我到 mysite.com/#wpcf7-f5514-p986-o1 后,我也遇到两个错误:
Warning: unlink(C:/src/hg-www/wp-content/uploads/wpcf7_captcha/1819614282.png): Permission denied in C:\src\hg-www\wp-content\plugins\really-simple-captcha\really-simple-captcha.php on line 225
和
Warning: unlink(C:/src/hg-www/wp-content/uploads/wpcf7_captcha/1819614282.txt): Permission denied in C:\src\hg-www\wp-content\plugins\really-simple-captcha\really-simple-captcha.php on line 225
我真的不知道什么是错的以及如何解决它。
有什么建议吗?
其他一些信息:
印刷的联系表格代码(如果需要)如下:
<form name="" action="/create-your-system/#wpcf7-f5514-p986-o1" method="post" class="wpcf7-form" novalidate="novalidate">
<div style="display: none;">
<input type="hidden" name="_wpcf7" value="5514">
<input type="hidden" name="_wpcf7_version" value="4.1">
<input type="hidden" name="_wpcf7_locale" value="en_US">
<input type="hidden" name="_wpcf7_unit_tag" value="wpcf7-f5514-p986-o1">
<input type="hidden" name="_wpnonce" value="ff2e2b253a">
</div>
<div class="wordpress-more-info-dropdown-div" id="dys-request-callback-dropdown">
<div id="contact-more-info-dropdown" class="wordpress-more-info-dropdown-div-label">
<span>Request a callback to discuss your quote</span>
<img class="wordpress-more-info-dropdown-div-arrow" alt="Heat Genius – Remote Heating Control" src="/img/default-images/wordpress-drop-down-more-infos-arrow.png">
</div>
</div>
<div class="inner-container">
<div class="HG-dys-contact-form-request-callback-container hideErrors" id="DYS-request-callback-container" style="display: block;">
<div class="left-column-contact-page"><div class="long-inputs"><p>Name (required)<br><span class="wpcf7-form-control-wrap your-name">
<input type="text" name="your-name" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false">
</span>
</p><p>Email address (required)<br><span class="wpcf7-form-control-wrap your-email">
<input type="email" name="your-email" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email" aria-required="true" aria-invalid="false">
</span>
</p>
<p>Phone (required)<br><span class="wpcf7-form-control-wrap your-phone">
<input type="text" name="your-phone" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false"></span>
</p>
<p>Post Code<br><span class="wpcf7-form-control-wrap your-postcode"><input type="text" name="your-postcode" value="" size="40" class="wpcf7-form-control wpcf7-text" aria-invalid="false"></span>
</p>
</div>
</div>
<div class="right-column-contact-page">
<p>Notes<br><span class="wpcf7-form-control-wrap your-message"><textarea name="your-message" cols="40" rows="10" class="wpcf7-form-control wpcf7-textarea" aria-invalid="false"></textarea></span></p>
<p><span class="wpcf7-form-control-wrap your-UID"><input type="hidden" name="your-UID" value="0b7f755668ad9ef6d1bf33b2e4302e3d72fb3dd9da089868566a7012dd0469b7" size="40" class="wpcf7-form-control wpcf7-text" id="hg-system-uid" aria-invalid="false"></span></p>
</div>
<p>Insert captcha<br>
<input type="hidden" name="_wpcf7_captcha_challenge_captcha-349" value="1819614282">
<img class="wpcf7-form-control wpcf7-captchac wpcf7-captcha-captcha-349 captcha" width="84" height="28" alt="captcha" src="http://192.168.1.250/wp-content/uploads/wpcf7_captcha/1819614282.png"><br>
<span class="wpcf7-form-control-wrap captcha-349">
<input type="text" name="captcha-349" value="" size="40" class="wpcf7-form-control wpcf7-captchar captchaText" aria-invalid="false"></span></p>
<div class="clearfix">
</div>
<p class="contact-form-submit-button"><input type="submit" value="Send" class="wpcf7-form-control wpcf7-submit"></p>
<div class="wpcf7-response-output wpcf7-display-none">
</div>
</div>
</div>
</form>
更新
好的,问题是#,因为存储表单的网址是 mysite.com/#summary ,显然网址中的哈希值已被替换通过联系人动作网址(也包含哈希)。
我刚刚在 mysite.com / 中尝试了相同的设置,但它确实有效。
所以现在我的问题是:我无法摆脱哈希,因为它是应用程序的一部分,我该怎么做才能避免替换哈希但仍然能够正确发送和使用表单?
联系表单7设置:
表单内容
<div class="wordpress-more-info-dropdown-div" id="dys-request-callback-dropdown">
<div id="contact-more-info-dropdown" class="wordpress-more-info-dropdown-div-label">
<span>Request a callback to discuss your quote</span><img class="wordpress-more-info-dropdown-div-arrow" alt="Heat Genius – Remote Heating Control" src="/img/default-images/wordpress-drop-down-more-infos-arrow.png"></div>
</div>
<div class="inner-container">
<div class="HG-dys-contact-form-request-callback-container" id="DYS-request-callback-container" >
<div class="left-column-contact-page">
<div class="long-inputs">
<p>Name (required)<br>[text* your-name]</p>
<p>Email address (required)<br>[email* your-email]</p>
<p>Phone (required)<br>[text* your-phone]</p>
<p>Post Code<br>[text your-postcode]</p>
</div>
</div>
<div class="right-column-contact-page">
<p>Notes<br>[textarea your-message]</p>
<p>[text your-UID id:hg-system-uid]</p>
</div>
<p>Insert captcha<br />
[captchac captcha-349 class:captcha size:l]
[captchar captcha-349 class:captchaText]
<div class="clearfix"></div>
<p class="contact-form-submit-button">[submit "Send"]</p>
和其他设置:
on_sent_ok: "location = '/form/#requestCallback;'"