We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47401
    • 295 Posts
    comp_nerd26 Reply #1, 9 years ago
    does anybody know how formit deals with checkboxes with an array of data? I know how to do this with PHP, do I need to pass the data to a snippet to convert the array to a string, to output the contents.

    so for example if i have:

    <input type="checkbox" name="test[]" value="option1"/>
    <input type="checkbox" name="test[]" value="option2"/>
    <input type="checkbox" name="test[]" value="option3"/>

    and the user checks option1 and option2. I am using formit to send me an email of the data, how is it possible to captchure an array of data with formit?

    will calling the [[+test]] in the email template chunk output an error, or an array?

    This question has been answered by comp_nerd26. See the first response.

    • discuss.answer
      • 47401
      • 295 Posts
      comp_nerd26 Reply #2, 9 years ago
      ah, ive just tested it, and it looks like that it does all the hard work for you, i.e just outputs the array in plain text smiley