Hi,
I’ve using one chunk for both the formit call and the forms html. I’m then using a dropdown TV with the values yes and no as the values. If yes is selected then i render the form chunk, if it’s not then I don’t render anything. But for some reason as soon as I put the formit call in the chunk it doesn’t render anything. I’ve tried taking the call out of the chunk and placing it in the template it’s self and this works fine. I’ve also tried using the chunk with the call in it but outside of the output filter and this is fine.
So my output filter is:
[[*showForm:if=`[[*showForm]]`:eq=`yes`:then=`[[$miniForm]]`:else=``]]
My miniForm chunk is:
[[!FormIt? &hooks=`email` &emailTpl=`miniFormEmail.Tpl` &emailTo=`[email protected]`
&validate=`name:required,telephone:required,postcode:required,telephone:isNumber,telephone:minLength=`8``]]
<form action="[[~[[*id]]]]" method="post" class="form" name="miniForm">
<p>[[+fi.error.error_message]]</p>
<label>Name:</label><span class="error">[[+fi.error.name]]</span>
<input type="text" name="name" class="[[!+fi.error.name:notempty=`error`]]">
<label>Phone:</label><span class="error">[[+fi.error.telephone]]</span>
<input type="text" name="telephone" class="[[!+fi.error.telephone:notempty=`error`]]">
<label>Postcode:</label><span class="error">[[+fi.error.postcode]]</span>
<input type="text" name="postcode" class="[[!+fi.error.postcode:notempty=`error`]]">
<button type="submit">Send</button>
</form>
Any ideas why this shouldn’t work, when it’s working fine outside of a filter. And my filters work fine with anything else. I’ve tried different combo’s of cached and un cached calls.
Thanks
Ben