We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42101
    • 125 Posts
    Quote from: BobRay at May 06, 2013, 08:46 PM
    FYI: Generally the snippet .php files are not used by extras. They user the snippets you see in the tree, which come from the database (unless set to static).

    Also, you should be aware that if you ever upgrade FormIt, your changes will be undone and the problem will come back unless that bug is fixed in the new version.

    Thanks for the info BobRay!

    AD
    • 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.]
        Helen Warner
        Number one pixel!
        Proud to be linked with MODX at Crimson Pixel
        • 42101
        • 125 Posts
        Quote from: boomerang at May 15, 2013, 09:36 AM
        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 name="answer[]" value="" type="hidden">
        <input name="answer[]" value="Oranges and Lemons" [[!+fi.answer:formitischecked="`Oranges" and="" lemons`]]="" type="checkbox"> Oranges and Lemons
        <input name="answer[]" value="Potatoes and Carrots" [[!+fi.answer:formitischecked="`Potatoes" and="" carrots`]]="" type="checkbox">Potatoes and Carrots
        <input name="answer[]" value="Tomatoes and cucumber" [[!+fi.answer:formitischecked="`Tomatoes" and="" cucumber`]]="" type="checkbox">Tomatoes and cucumber<p></p>
        <input name="go" value="Enter Here" type="submit">
        </form> 


        Never had this problem with Formit before, any suggestions.

        UPDATE: Have rolled back to version 2.1.2 and problem no longer appears.

        you have to change it in the php snippet from the snippet tree. Works for me.
        • Thanks ad2003 amended the various occurence of the snippet and it worked. Did have to change in both FormItIsChecked and FormItIsSelected snippets.
            Helen Warner
            Number one pixel!
            Proud to be linked with MODX at Crimson Pixel