We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37042
    • 384 Posts
    Is there a way to force the selected items of a checkbox or even radiobox onto seperate lines. I'm talking about the email notification that a client would get.

    At the moment. when a user selects more than one PDF in my Formit call, the email results to my client all appear on one line.

    This is part of my formit call:

    
    <div class="grid-12-12 clear">
    <label>Requested PDFs: [[!+fi.error.pdf]]</label>
    
    <ul class="formee-list">
    
       <li>
       <input type="hidden" name="pdf[]" value="" />
       </li>
     
       <li>
       <input type="checkbox" name="pdf[]" value="Case Study 1" [[!+fi.pdf:FormItIsChecked=`Case Study 1`]] >Case Study 1
       </li>
      
       <li>
       <input type="checkbox" name="pdf[]" value="Case Study 2" [[!+fi.pdf:FormItIsChecked=`Case Study 2`]] >Case Study 2
        </li>
    
       <li>
       <input type="checkbox" name="pdf[]" value="Case Study 3" [[!+fi.pdf:FormItIsChecked=`Case Study 3`]] >Case Study 3
       </li>
    
    </ul>
    </div>
    



    The chunk which emails results to my client is partly as follows
    <strong>PDFs Requested: </strong>[[+pdf]]


    and the client gets the following:
    PDFs Requested: 
    PDF1 PDF 2 PDF 3 PDF 4


    instead of
    PDFs Requested: 
    PDF1 
    PDF 2 
    PDF 3 
    PDF 4
    


      ...
      • 4172
      • 5,888 Posts
      you will need a formit - hook, which takes the pdf-array and adds some line-breaks to each item
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 37246
        • 128 Posts
        New in 1.6+:
        emailMultiWrapper Wraps values submitted by checkboxes/multi-selects with this value. Defaults to just the value. (1.6.0+)
        emailMultiSeparator Separates checkboxes/multi-selects with this value. Defaults to a newline. (1.6.0+)
        http://rtfm.modx.com/display/ADDON/FormIt.Hooks.email
          I LOVE MODX! | greyskymedia.com
          • 37042
          • 384 Posts
          Thanks Grey Sky Media. Hadn't spotted that one smiley
            ...