We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27437
    • 49 Posts
    Hi Guys,

    I wish I could fix it myself, but I don't know where to start. Anyways it seems that arrays still don't get passed in formitretriever

    I tested it in 2.1.5 and 2.2, maybe I miss something. Here is my code to test it.

    page 1:
    [[!FormIt? 
        &hooks=`redirect` 
        &store=`1` 
        &redirectTo=`16`
    ]]
    <form action="" method="post" class="form">
        <label>
            Locaties:* [[!+fi.error.location]]
            <input type="hidden" name="location[]" value="" />
        </label>
        <ul>
          <li>
            <label><input type="checkbox" name="location[]" value="amsterdam" 
    [[!+fi.location:FormItIsChecked=`amsterdam`]] /> amsterdam</label>
          </li>
          <li>
            <label><input type="checkbox" name="location[]" value="new york" 
    [[!+fi.location:FormItIsChecked=`new york`]] /> new york</label>
          </li>
        </ul>
    <input type="submit" value="Next" />
    </form>
    


    page 2 (id 16):
    [[!FormItRetriever]]
    The value = [[+fi.location]]
    <form action="" method="post" class="form">
    <input type="hidden" name="location[]" value="[[+fi.location]]" /> 
    </form>
    
    [ed. note: sjeijk last edited this post 12 years, 2 months ago.]
    • This is still a problem. The snippet uses toPlaceholders, which according to the rtfm is what to use in the case of multidimensional arrays. However, no examples or description of such use seems to be found.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org