Support » Plugin: Contact Form 7 » Format the Checklist using OL

  • 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>?

    http://wordpress.org/plugins/contact-form-7/

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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.

    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.

    You can use ordered lists in your email code.

    An example might be:

    <ol>
    <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>
    </ol>

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

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

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

    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:

    <ol>
    <li>[checkbox]</li>
    </ol>

    What I want to get back is:

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

    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:

    [checkbox]

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Format the Checklist using OL’ is closed to new replies.