PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Default Value HTML Encoding Issue in Paragraph Text Field

  1. I'm having an issue where default value text adds HTML line breaks. Something is changing this:

    a.
    b.
    c.
    d.

    into this:

    a.<br />
    b.<br />
    c.<br />
    d.

    Screenshots:
    http://cl.ly/8X87 & http://cl.ly/8XvI

    Live form:
    http://kennethrobersonphd.com/kids/forms/child-developmental-history-questionnaire/

    Thanks for any help!

    Posted 10 years ago on Monday July 18, 2011 | Permalink
  2. I'm unable to reproduce this. I have setup a Paragraph field and used the default value you included above. See: http://i.imgur.com/ld7u0.png

    When I view the form I see: http://i.imgur.com/GHltb.png

    I don't see any line breaks. Are you copy-n-pasting the value of the Default Field from something like Microsoft Word? If so it could be carrying over those line breaks as hidden text. Try typing in the values right in the Default Value field instead.

    Posted 10 years ago on Monday July 18, 2011 | Permalink
  3. No, it's plain text in the backend.

    Interestingly, when I preview the form it appears as it should. So I guess it's a conflict with the theme? Any idea how it could be affected like that?

    Posted 10 years ago on Monday July 18, 2011 | Permalink
  4. It could be something in your theme... or a plugin conflict of some sort that is causing this issue.

    Before we can even suggest how to fix it we need to determine what is causing the problem to occur. Follow the steps here:

    http://www.gravityhelp.com/documentation/page/Testing_for_a_Theme/Plugin_Conflict

    Posted 10 years ago on Monday July 18, 2011 | Permalink
  5. I believe this theme uses the [ raw ] shortcode, which has been known to cause problems with < br /> and < p>.

    http://themeforest.net/item/traject-wordpress-portfolio-and-business-theme/116671

    It's been discussed here before, mostly regarding validation:
    http://www.gravityhelp.com/forums/topic/form-worked-for-a-while-and-then-disappeared
    http://www.gravityhelp.com/forums/topic/page-will-not-validate-with-form-in-it-unless-i-remove-filters

    and I see in the source of your page that you have the same issues with line breaks and paragraphs being added. You may have to disable that shortcode or wrap the form shortcode INSIDE the raw shortcode to make it work.

    Posted 10 years ago on Tuesday July 19, 2011 | Permalink
  6. Enclosing the form shortcode inside the raw shortcode fixed it. Thanks!

    Posted 10 years ago on Wednesday July 20, 2011 | Permalink
  7. We highly recommend NOT using the RAW shortcode. It's detrimental to your WordPress site as a whole because it changes how shortcodes function and are executed. It "fixes" one issue but introduces an even bigger issue in the process. It's a hack and causes problems with plugins. It seems to be very popular with ThemeForest theme developers.

    Posted 10 years ago on Wednesday July 20, 2011 | Permalink

This topic has been resolved and has been closed to new replies.