WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. talkstory
    Member
    Posted 11 months 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>?

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

  2. buzztone
    Member
    Posted 11 months 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
    Member
    Posted 11 months 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
    Member
    Posted 11 months ago #

    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>
  5. buzztone
    Member
    Posted 11 months ago #

    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.

  6. talkstory
    Member
    Posted 11 months 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:

    <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.

Reply

You must log in to post.

About this Plugin

About this Topic