• Resolved ArundelMom

    (@arundelmom)


    Data that comes in through Contract Form 7 textarea does not preserve the formatting in the datatable or when viewing using any CFDB commands. For example “Make is new” is translated into this: a€?Make is newa€?. As well, paragraph returns are missing etc. However, the emails that are generated look fine. Is there a way around these character substitutions?

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    Regarding link breaks, go to the options page and see “Show line breaks in submitted data table” and set to true.

    The other issue is some character set conversion issue. The plugin and its tables in the DB uses UTF-8. But if the submitted form is coming in some other character format you end up with strange characters. I’m not sure how to fix this, but I’ll give you something to check. If you can, have a look at your installation’s wp-config.php file, and see if you have the line:
    define('DB_CHARSET', 'utf8');
    It it is something else, you might try changing it and seeing if the form submission comes out OK then.

    Regarding the line breaks:

    Is there a way to preserve line breaks when outputting data with [cfdb-html]?

    Plugin Author Michael Simpson

    (@msimpson)

    Wrap it in an HTML PRE tag.

    Thread Starter ArundelMom

    (@arundelmom)

    Thanks!

     works to preserve the line breaks - but now I don't have text wrapping!  I am trying what I can... nothing helps yet...

    Plugin Author Michael Simpson

    (@msimpson)

    Try this:

    <pre style=”
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    white-space: pre-wrap;
    word-wrap: break-word;
    “>

    Thread Starter ArundelMom

    (@arundelmom)

    Brilliant!!!
    Thank you so much!!!

    Thanks for the reply.

    Changing the white-space value does work, but the resulting line break is bigger than the other gaps I have between normal “<p>” paragraphs.

    Is there any way to split the output into paragraphs at each line break (like WordPress does)? As far as I know it isn’t possible to change the size of line breaks with CSS — they are always the same size as the text.

    Plugin Author Michael Simpson

    (@msimpson)

    CSS line-height Property might help

    I have already set the line-height for the page (so the line-height for lines with text is correct). The problem is that the spacing between paragraphs is smaller than an entire empty line.

    WordPress automatically wraps sections of text separated by a line break into <p> tags. Can this plugin do the same?

    This might not be possible, but it’d be great if it was ??

    Plugin Author Michael Simpson

    (@msimpson)

    I see. The plugin is actually specifically stripping out WP’s injected BR and P tags (wpautop). The issue is that people want to use [cfdb-html] with their own markup, but then WP comes along and injects unwanted tags in that.

    So I when ahead and coded in an option to turn this back on. To try it, download the development version and add wpautop="true" to your short code. Please let me know how that works for you.

    Thanks, I will give this a try next week and let you know.

    I’ve installed v1.8.7 and have added wpautop="true" to the [cfdb-html] shortcode, but line breaks in form data are still not being wrapped in p or br tags. Am I missing something?

    Plugin Author Michael Simpson

    (@msimpson)

    Try it with “false”. I think I reversed it my mistake in the code.

    Nope, still no change with it set to “false”.

    Is this feature still in the development version?

    I have just downloaded it again and I’m still unable to make this work. I have tried setting wpautop to true and false. The line breaks appear correctly in the backend table view, but they disappear when I use the [cfdb-html] shortcode.

    Sorry to bug you again but I have no idea why this isn’t working for me.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Text Area Formatting’ is closed to new replies.