Contact Form 7
Format the Checklist using OL (6 posts)

  1. talkstory
    Posted 2 years ago #

    I have a checklist with a dozen line items. I've used "display:block;" in the CSS to fix the formatting of the on-page form. However, when it is sent by email the checked items are still displayed as a comma separated list.

    Can I wrap the checklist output in <ol> with individual items wrapped in <li>?


  2. buzztone
    Posted 2 years ago #

    The CSS you have added probably only applies to your website not the email you are sending. CSS for email is an entirely separate and significantly more complex issue.

  3. talkstory
    Posted 2 years ago #

    That's correct. The CSS only applies to my site.

    The checklist items are currently wrapped with <span>. I am wondering if there is a way to change this to wrap in <ol> and <li>.

    Perhaps someone can help me find out where to adjust this in the plugin or add a function that can hook into the plugin output.

  4. dntfeedthemnkys
    Posted 2 years ago #

    You can use ordered lists in your email code.

    An example might be:

    <li>This is your question on the form:<li>
    <p style="margin-left:60px">[your-call-to-answer]</p>
    <li>Your second query</li>
    <p style="margin-left:60px">[Your-2nd-call-to-answer]<p>
  5. buzztone
    Posted 2 years ago #

    You can add any HTML to the Mail/Message body: section of the CF7 interface e.g.

    <li> <strong>Your Name:  </strong>[your-name] </li>
    <li> Your Email:  [your-email] </li>

    Make sure you tick Use HTML content type and ordered list should be sent in email from CF7.

  6. talkstory
    Posted 2 years ago #

    Thanks for the ideas, but this doesn't solve my problem which is that there is no way to format the individual items in a checkbox response. For example, I create an email response that shows:


    What I want to get back is:


    What I actually get back is:

    <ol><li>Oranges, Pears, Bananas</li></ol>

    It looks like I am going to have to set up a bunch of individual checkboxes, rather than a single checkbox with multiple responses.

    So instead of:


    I will end up with:

    [checkbox 1]
    [checkbox 2]
    [checkbox 3]

    It's a longer process, but it may be the only solution. I'm still open to ideas if anyone has any other thoughts.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic