562 views

Design HTML in prd forms

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:

      function returnHTML(){
      var html = '<p>a html structure as text</p>';
      }

    2. Inside field tab

      (function () {return "<...Your XHTML here...>";} ) ();

    3. Inside scripts tag again

      </script>
      <style>
      Clean CSS that the editor cannot interpret and gives errors in the whole file
      </style>
      <script>

    4. Inside scripts tag again

      </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
Labels (1)
0 Likes
3 Replies
Knowledge Partner
Knowledge Partner

Re: Design HTML in prd forms

sebastiantidare;2495759 wrote:
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:

      function returnHTML(){
      var html = '<p>a html structure as text</p>';
      }

    2. Inside field tab

      (function () {return "<...Your XHTML here...>";} ) ();

    3. Inside scripts tag again

      </script>
      <style>
      Clean CSS that the editor cannot interpret and gives errors in the whole file
      </style>
      <script>

    4. Inside scripts tag again

      </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

      This forum is for questions about Designer itself, not about design using Designer. You might better ask in the userapp-workflow forum, where things like PRD design are regular topics.
0 Likes

Re: Design HTML in prd forms

dgersic;2495800 wrote:
This forum is for questions about Designer itself, not about design using Designer. You might better ask in the userapp-workflow forum, where things like PRD design are regular topics.


Hence my question since the designer have an editor that cannot interpret the code as I want it.
I could rewrite the question in this forum as: Is it possible to configure the Designer to interpret Clean HTML code, or change the editor in some way to make it work in code example 4?
0 Likes
Knowledge Partner
Knowledge Partner

Re: Design HTML in prd forms

sebastiantidare;2495992 wrote:
Hence my question since the designer have an editor that cannot interpret the code as I want it.
I could rewrite the question in this forum as: Is it possible to configure the Designer to interpret Clean HTML code, or change the editor in some way to make it work in code example 4?


Designer's interpretation of "clean" HTML is quirky at best. I don't know of a way to convince it to allow things that are perfectly acceptable, that it doesn't like. Because this is a PRD/form question, I still think you'd be better off asking in userapp-workflow.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.