Hi,

I have various ways of inserting my own HTML inside the prd forms. However, there are no ways of inserting with an editor that can interpret the HTML and get Clean code.
  1. My preferred way is to write Everything in the scripts tab using JavaScript functions that return HTML that can be appended/inserted inside the On Load tab.
  2. There is also possible to create a HTML Field in the Fields tab which also returns HTML, but that leaves me with code in two completely different places.
  3. Now here is a way i found recently. Like the CSS, I use the scripts tag and insert it by ending script and starting script and putting the code inbetween.

  1. Inside scripts tab:
    Code:
    function returnHTML(){
     var html = '<p>a html structure as text</p>';
    }
  2. Inside field tab
    Code:
    (function () {return "<...Your XHTML here...>";} ) ();
  3. Inside scripts tag again
    Code:
    </script>
    <style>
       Clean CSS that the editor cannot interpret and gives errors in the whole file
    </style>
    <script>
  4. Inside scripts tag again
    Code:
    </script>
    <body>
      <section>
         <p>CLEAN HTML CODE, but still with an editor that cannot interpret this. However, this is the only way to insert Clean HTML code that doesnt wait for on load event. </p>
      </section>
    </body>
    <script>


The last example is good but not perfect. It does not use on load event, which otherwise creates a flickering on the form because it basically has to load the form twice.
It also provides the possibility to write Clean HTML code without inserting it and appending it. It will be placed inside the body together with all the other scripts which actually works fine.
The negative aspect is the editor that interprets as JavaScript and cannot create the sidebar structure.

Here comes the question, is there a way to insert HTML in a Clean way? If not, what is then the best approach?

Best,
Sebastian