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.

Form post body not accepting HTML

  1. RichardBest
    Member

    Hi guys

    I'm hoping you might be able to help out with a problem I'm having please. A form I'm deploying to submit posts won't accept HTML, like this:

    <li><strong>Term</strong>: This Agreement shall commence on the Effective Date and end the day after the end of the Warranty Period, unless otherwise varied in accordance with clause [add cross reference].</li>

    When I try to submit a form with this in the post entry field the form entries just go white and nothing submits.

    I know there's no opening and closing UL or OL tags. That's deliberate as I'm picking them up in the index.php and single.php templates. (Might sound odd, but there's a reason for this.)

    Any ideas what might be causing this please?

    Many thanks.
    Richard

    Posted 13 years ago on Monday July 25, 2011 | Permalink
  2. I'm unable to replicate this using a Post Body field and the data you included above. See screenshots below.

    Form Data:
    http://i.imgur.com/OI0bq.png

    Entry Data:
    http://i.imgur.com/SjfDC.png

    Post Data:
    http://i.imgur.com/hPJxY.png

    The first thing I would suggest, which i'm sure you probably figured would be my first question, is to check for theme and plugin conflicts that could cause this by following these directions:

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

    The next question would be if you have any custom code in place using hooks that could be impacting the processing.

    Posted 13 years ago on Monday July 25, 2011 | Permalink
  3. @RichardBest - is this on a multisite installation? Also, does the form submit properly, but the post body is empty? Or are you getting a blank screen like a 500 Internal Server Error? I'm not clear on what "form entries just go white" means exactly. Thanks.

    Posted 13 years ago on Monday July 25, 2011 | Permalink
  4. RichardBest
    Member

    Thanks Carl, Chris. I've checked for theme and plugin conflicts but am confident there is none. The problem appears across all 3 themes I have installed, including TwentyTen and TwentyEleven. I've deactivated all other plugins and the problem remains.

    I'm running the latest release versions of WP and GF.

    Interestingly, I've realised I can get the code snippet I gave you above to submit through the form. The problem I'm having is with more complicated submissions with nested lists, like this:

    <li>
    
    <strong>Duration of Contract</strong>
    
    <ol>
    
    <li><strong>Initial Contract Period</strong>: This Contract begins on the Commencement Date and continues for the duration of the Initial Contract Period unless terminated in accordance with clause [insert cross reference] or [insert cross reference].</li>
    
    <li><strong>Option to extend Contract Period</strong>:
    
    <ol><li>The Initial Contract Period may be extended by the Customer for further period(s), specified in item [8] of the Contract Details (each an Option Period), on the terms and conditions then in effect, by giving written notice to the Contractor.  Such notice must: 
    
    <ol><li>be at least 30 days; or</li>
    <li>such other period as specified in item [9] of the Contract Details (Option Notice Period),</li></ol>
    before the end of the current Contract Period.</li>  
    
    <li>Any extension exercised in accordance with this clause 3.2 takes effect from the end of the then current Contract Period.</li></ol></li> 
    
    </ol>
    
    </li>

    Would you mind trying this code on your site please and letting me know if it submits?

    Chris, I'm not running multisite. When the form submits, the screen/page simply refreshes as if I'd never submitted anything, i.e., the page and the empty form appear and there's no confirmation message.

    Posted 13 years ago on Tuesday July 26, 2011 | Permalink
  5. Hi Richard. Something weird is going on.

    I posted your HTML to this form on my site twice:
    http://gravity.chrishajer.com/title-test/

    Post body without using a content template (pastie)
    Post body with a content template (pastie)

    My content template is simply:

    <ol class="richardbest">
    {Post Body:5}
    </ol>

    I pasted in your entry exactly as you posted it here, both times. When using the content template, a whole bunch of extra stuff got added. Not sure if that is causing you a problem, but it was strange to see on my site. I was looking for an option to turn off auto-formatting, like you can when customizing the email notifications, but I could not find it.

    I'm using WordPress 3.2.1 and Twenty Eleven (child theme) with the following plugins:

    Embiggen Site Title
    Gravity Forms 1.5.2.8
        PayPal Add-on
        User Registration Add-on

    My functions.php is empty except for a function which applies only to a different form with a gform_post_submission_2 hook.

    Very weird, although my experience was not the same as yours. Mine submitted fine. Maybe your form is more complex and that's causing problems on the host, with memory or something like that? Or mod_security or SELinux causing trouble? Maybe the list items are a red herring?

    Can you post a link to the form online on your server, or export the form as XML so we can try it?

    Posted 13 years ago on Tuesday July 26, 2011 | Permalink
  6. RichardBest
    Member

    Hi Chris

    The test form I'm using is very simple. I've stripped out extra fields to check whether they were causing the problem and they're not. Here's a link to the export file: http://dl.dropbox.com/u/10701887/gravityforms-export-2011-07-26.xml

    The problem does seem to be caused by the nested lists. The following works (i.e., will submit):

    <li>blah</li>

    But, the following will not submit:

    <ol>
    <li>blah</li>
    </ol>

    I see no logical reason as to why that should be the case. I'm stumped. Even weirder that you can't emulate the problem as I have fresh installs of WP and GF.

    Thanks for any additional thoughts/help.

    Richard

    Posted 13 years ago on Tuesday July 26, 2011 | Permalink
  7. @RichardBest Send us a WordPress admin login for the site AND an FTP login for the site via our Contact Us form and we can do some debugging. Reference this forum post when doing so. We'd have to debug this on your server, neither Chris or I can replicate it locally and we aren't located in the same location or using the same test servers... so it's definitely specific to your server or site.

    Posted 13 years ago on Tuesday July 26, 2011 | Permalink
  8. RichardBest
    Member

    Thanks Carl. Will do. Incidentally, I just tested the same form on a different WordPress install with the nested ordered list code. This time I received this error message:

    Forbidden
    
    You don't have permission to access /test/ on this server.
    
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    I suspect this is indeed server related.

    Will now send you the logon and FTP logon.

    Many thanks
    Richard

    Posted 13 years ago on Wednesday July 27, 2011 | Permalink