Hi there,
I've downloaded latest version of Formit 2.2.0 and seem to be getting this warning message:
Warning: in_array() expects parameter 2 to be array, string given in /home/mydomain/public_html/core/cache/includes/elements/modsnippet/4.include.cache.php on line 39
The fix listed above has already been applied but it is causing errors with FormItIsChecked. My Formit call is:
[[!FormIt? &submitVar=`go` &hooks=`redirect` &validate=`answer:required` &store=`1` &redirectTo=`3`]]
<form action="[[~[[*id]]]]" method="post" class="form">
<p>QUESTION:</p>
<label>Which are fruit? [[!+fi.error.answer]]</label>
<input type="hidden" name="answer[]" value=""/>
<input type="checkbox" name="answer[]" value="Oranges and Lemons" [[!+fi.answer:FormItIsChecked=`Oranges and lemons`]]> Oranges and Lemons
<input type="checkbox" name="answer[]" value="Potatoes and Carrots"[[!+fi.answer:FormItIsChecked=`Potatoes and Carrots`]]>Potatoes and Carrots
<input type="checkbox" name="answer[]" value="Tomatoes and cucumber" [[!+fi.answer:FormItIsChecked=`Tomatoes and Cucumber`]] >Tomatoes and cucumber</p>
<input type="submit" name="go" value="Enter Here" />
</form>
Never had this problem with Formit before, any suggestions.
UPDATE: Have rolled back to version 2.1.2 and problem no longer appears.
[ed. note: boomerang last edited this post 10 years, 11 months ago.]