We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30505
    • 5 Posts
    Using the checkbox technique from the Simple contact form example, is there a way to format the checkbox output. The problem I'm running into is that I have a collection of checkboxes that have long value strings. The default behavior seem to be that all the checked items get combined into a single string with each checkbox value separated by a space. The resultant string is not easily readable. It looks more like a confusing paragraph. Is there an easy way to add a line break or other HTML formatting to each item?

    I'm using Revolution 2.1.1-pl and FormIt 2.0.3.

    Any advice would be greatly appreciated.

    Thanks!

      • 30505
      • 5 Posts
      Okay, I found the answer to my own question:

      Handling Checkboxes and Multi-Selects in the Email

      FormIt, as of 1.6.0+, will automatically handle checkboxes and combine them into one field. You can use the &emailMultiSeparator and &emailMultiWrapper properties to specify how they are joined. For example, to wrap checkboxes in LI tags:

      [[!FormIt?
      &emailMultiWrapper=`<li>[[+value]]</li>`
      ]]

      Or just to separate them with BR tags:

      [[!FormIt?
      &emailMultiSeparator=`
      `
      ]]