好的,所以问题是我创建了一个单页 html 网站,其中包含代表所有页面的多个部分。我遇到的问题是 FormIt 联系表格有效,但我无法让它重定向到正确的 ID。因此,一旦我提交表单,它就会带我回到页面顶部。有任何想法吗?在下面查看我的 FormIt 调用:
[[!FormIt?
&hooks=`email`
&emailFrom=`info@brickhousetitle.com`
&emailTpl=`emailChunk`
&emailTo=`[[+email]]`
&redirectTo=`http://myurl/index.php#contact`
&emailSubject=`BHT Website Inquiry`
&validate=`name:required,
email:email:required,
comment:required:stripTags`
&successMessage=`
<div class="alert alert-success marginTop25">
<button type="button" class="close" data-dismiss="alert">×</button>
<h4>Thank you! Your inquiry has been submitted successfully.</h4>
</div>
`
&validationErrorMessage=`
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
<ul>
[[!+fi.error.name:!empty=`
<li><a href="[[~[[*id]]]]#name">Name is a required field</a></li>
`]]
[[!+fi.error.email:!empty=`
<li><a href="[[~[[*id]]]]#email">Email is a required field</a></li>
`]]
[[!+fi.error.comment:!empty=`
<li><a href="[[~[[*id]]]]#comment">Comment is a required field</a></li>
`]]
</ul>
</div>
`
]]
[[!+fi.validation_error_message:!empty=`
<div class="alert alert-error marginTop25">
<button type="button" class="close" data-dismiss="alert">×</button>
<ul>
[[!+fi.error.name:!empty=`
<li><a href="[[~[[*id]]]]#name">Name is a required field</a></li>
`]]
[[!+fi.error.email:!empty=`
<li><a href="[[~[[*id]]]]#email">Email is a required field</a></li>
`]]
[[!+fi.error.comment:!empty=`
<li><a href="[[~[[*id]]]]#comment">Comment is a required field</a></li>
`]]
</ul>
</div>
`]]
[[!+fi.successMessage]]
<form action="[[~[[*id]]]]" method="post">
<div class="[[!+fi.error.name:notempty=`control-group error`]]" id="name">
<label for="name">Name:
<div class="controls">
<input type="text" name="name" value="[[!+fi.name]]" class="input-block-level">
</div>
</label>
</div>
<div class="[[!+fi.error.email:notempty=`control-group error`]]" id="email">
<label for="email">Email:
<div class="controls">
<input type="text" name="email" value="[[!+fi.email]]" class="input-block-level">
</div>
</label>
</div>
<div class="[[!+fi.error.comment:notempty=`control-group error`]]" id="comment">
<label for="comment">Comment: </label>
<div class="controls">
<textarea name="comment" cols="30" rows="10" value="[[!+fi.comment]]" class="input-block-level"></textarea>
</div>
</div>
<input type="submit" value="Submit" class="btn btn-primary">
</form>