We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I have a multiple select drop down in a FormIt form like this (values have been changed to protect the privacy of the client):

         <div class="form-group">
            [[!+fi.error.inquiry]]
            <label for="inquiry">[[%custom.contact_inquiry? &topic=`custom` &language=`[[++cultureKey]]`]]</label>
            <select name="inquiry[]" id="inquiry" class="form-control" value="[[!+fi.inquiry]]" multiple>
                <option value="General" [[!+fi.inquiry:FormItIsSelected=`General`]]>General</option>
                <option value="Specific" [[!+fi.inquiry:FormItIsSelected=`Specific`]]>Specific</option>
                <option value="Particular" [[!+fi.inquiry:FormItIsSelected=`Particular`]]>Particular</option>
                <option value="Whatever" [[!+fi.inquiry:FormItIsSelected=`Whatever`]]>Whatever</option>
                <option value="Other" [[!+fi.inquiry:FormItIsSelected=`Other`]]>Other</option>
            </select>
        </div>
    


    In my FormItRetriever page I have the following line:

    Information On: [[!+fi.inquiry]]
    


    It outputs a comma delimited array of values if multiple options were selected. No spaces after the comma, but that's ok.
    Incidentally, the record of the entry in FormSave does have comma delimited values with spaces after them.

    In my response chunk I have this:

    Information On: [[+inquiry]]
    


    It outputs each item in the array successfully, but without the comma.

    Any idea how to make it output each value with a comma after it (accept the last one)?

    I noticed in the documentation for FormitFastPack it says:

    fiProcessArrays: A FormIt hook which transforms array values into concatenated strings. Later versions of FormIt now provide similar functionality.

    But I can't find any documentation on how to do this.
    [ed. note: rx2 last edited this post 10 years ago.]