We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31255
    • 118 Posts
    Using this in my form (From RTFM, modified of course in my site).
    [[!FormIt? &emailTo=`[[+addressTo]]`]]
    ...
    <select name="addressTo">
       <option value="[email protected]" [[!+fi.addressTo:FormItIsSelected=`[email protected]`]]>John</option>
       <option value="[email protected]" [[!+fi.addressTo:FormItIsSelected=`[email protected]`]]>Jane</option>
    </select>


    Error log got errors like this every time I visit page for every line which are in option:
    [2014-02-04 xx:xx:xx] (ERROR @ /...../public_html/core/cache/includes/elements/modsnippet/26.include.cache.php : 39) PHP warning: in_array() expects parameter 2 to be array, string given

    Whats going on?
      Tassu, webmaster of Valokammi
      • 4172
      • 5,888 Posts
      what is your snippet with id 26?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 31255
        • 118 Posts
        No. 26 is FormItIsSelected snippet.
          Tassu, webmaster of Valokammi
          • 4172
          • 5,888 Posts
          a little eNotice - (bug)

          either try to set your system-setting debug to 0

          or fix it by replacing this:

          if (in_array($options,$input)) {
            $output = ' selected="selected"';
          }


          with this:

          if (is_array($input) && in_array($options,$input)) {
            $output = ' selected="selected"';
          }


          and open an issue on github!
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 31255
            • 118 Posts
            That did it. Thanks. Found it in github too. Wondering why this is still in package?
              Tassu, webmaster of Valokammi