• Resolved jerome_toole

    (@jjjrome)


    I’m using the inline form option (define( 'PARDOT_FORM_INCLUDE_TYPE', 'inline' );) in the plugin in order to be able to use certain tracking features.

    It seems to work on the first load but on subsequent loads, the scripts in the head are misconfigured and sometimes the html is exposed as text. The result is that the correct scripts aren’t loaded and so the form fails.

    One of the script tags is pointing to an obviously wrong src

    
    <script type="text/javascript" src="https://go.pardot.com/customer/en/portal/articles/2126621-default-form-style-classes-reference type=" text="" javascript"="">
    

    There are the following console errors:

    
    2126621-default-form-style-classes-reference%20type=:1 Failed to load resource: the server responded with a status of 404 (Not Found)
    (index):1421 Uncaught SyntaxError: Invalid or unexpected token
    (index):1429 Uncaught ReferenceError: pardot is not defined
    

    If I clear the cache and reload, the form loads correctly again.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter jerome_toole

    (@jjjrome)

    I’ve now tested this with a fresh wordpress install, 2017 theme, fresh form with standard fields and the standard layout template and getting the same issue.

    Plugin Author Cliff Seal

    (@cliffseal)

    Hey @jjjrome,

    Usage of that constant is not documented or recommended at this point. It’s still in the codebase in case we want to finish that particular functionality at a later date.

    Let me know if you have any other questions.

    Thread Starter jerome_toole

    (@jjjrome)

    Ah, ok. We wondered if that was the case. Would be so powerful if it worked as it would solve a bunch of issues with tracking and styling.

    Thanks anyway, Cliff.

    Plugin Author Cliff Seal

    (@cliffseal)

    @jjjrome: Sure thing!

    To accommodate situations in which styling is troublesome, I recommend using form handlers with a native WordPress form building plugin. This is really straightforward and allows for non-embedded forms while keeping the tracking/cookie functionality.

    Thread Starter jerome_toole

    (@jjjrome)

    In this case though we were trying to avoid form handlers so that the client could create forms and implement them into the site without technical help.

    In the end we’ve overcome the iframe difficulties by using iframe resizer to avoid scrollbars and to nudge the page up when the thank you code is shown.

    We’re also using the postmessage method for analytics on completion – guide here.

    Plugin Author Cliff Seal

    (@cliffseal)

    That makes sense! Thanks for sharing your solution!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Inline Form markup breaks after reload.’ is closed to new replies.