Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1086377

    Hi,

    I am attempting to add the following JS code to a code block for a tracked contact form however after update the viewed page seems ok but when you view the backend the code block is not correct and is thrown out.

    If you view the page or test the code you should see what I am experiencing.

    Please view PC below.

    Cheers
    John

    #1087865

    Hey John,
    Sorry for the late reply, I have taken a look at your page and on the backend there several elements that are not working correctly, I see that you are using v4.5.1 with Yoast
    There were a couple of issues with this version, so I recommend updating to v4.5.5 to ensure that you are not experiencing one of them.

    Best regards,
    Mike

    #1087881

    Hi Mike,

    I have updated the plugins and the theme to the latest..

    I then went back in and re-completed the page however I am still getting the same result.

    Any assistance is greatly appreciated.

    Cheers
    John

    #1087975

    Hi,
    Thanks, I took another look and see that the html in the infusion form is rentering in the backend within the debugger, this has broken the elements in the builder. Please see the screenshot in Private Content area, you will see that in the debugger field the form is showing instead of the code.
    I checked the code snippet you posted in the Private Content area for un-closed div’s and found none and I also checked it in a validator and it passed, but when I added it to my localhost it also broke my page on the backend. So the solution here is to create a “shortcode” from your form so it will only render on the front end.
    While you can do this yourself if you have that experience, but I will recommend using a plugin for ease of use.
    I tested: Insert Html Snippet , just add your html in the plugin field:
    2019-04-07-083214
    and then add the “shortecode” to a code block element:

    [xyz-ihs snippet="infusion-form"]

    and it will work on the frontend without braking your backend.
    Please note that when you try to remove the code block that you have there now you will probably lose most of your page, that’s what happened to my test page, so just be ready to re-build your page.

    Best regards,
    Mike

    #1088079

    Hi Mike,

    Many thanks for the effort.

    I installed the HTML snippet inserter and applied the code.

    The result I am getting is not great as the form elements are not rendering as they should.

    See image below.

    Also, if you refer to the other page link I have this one has an iFrame for the form but it does not render well to a mobile phone.

    Should I also turn off the debugger?

    Cheers
    John

    #1088477

    Hi,
    Please give the Shortcoder a try, I tested it and it worked good.

    Best regards,
    Mike

    #1088939

    Hi Maike,

    Many thanks for the suggestion. That seemed to have done the trick.

    Cheers
    John

    #1088995

    Hi,
    Glad to hear, I assume we can close this now, but I like to ask first. Shall we close this then?

    Best regards,
    Mike

    #1089286

    Yes please close Mike.

    Many thanks
    John

    #1089313

    Hi,

    If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Code block breaking after page update’ is closed to new replies.