Highlighted
Acclaimed Contributor.
Acclaimed Contributor.
1246 views

Add html to form

Is that possible to set into form some html, if i have html code ?

0 Likes
18 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Add html to form

Hi Alarmus

Enabling HTML in forms

Forms Designer has an HTML Editor and an HTML Viewer that you can add to forms.

  • The HTML Editor enables users to add and edit HTML text in Service Manager forms. It uses standard HTMLformatting.
  • The HTML Viewer enables users to view (but not edit) the formatted HTML text entered by using the HTML Editor.
Carlos Villalobos R
Customer Support Engineer
If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Add html to form

Where can i set html code and use it on form ?

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Add html to form

Add an HTML Editor or Viewer to a form

Applies to User Roles:

System Administrator

To Add an HTML Editor or Viewer to a form:

  1. Click Tailoring > Forms Designer in the System Navigator, or type fd on the Service Manager command line and then press Enter.
  2. Type a form name and click Search.

    Service Manager opens a list of forms. Click the form you want to update to open it.

  3. Click Design to open design mode.
  4. Drag the HTML Editor icon to the desired location.

    –or–

    Drag the HTML Viewer icon to the desired location.

  5. Type the name in the Value text box of the Name property.
  6. Specify the field or variable in which to store the HTML in the Value text box of the Input property.
  7. Specify the height, width, and other properties of the HTML Editor or viewer, as desired.
  8. Click Web Preview to see what the form will look like in the Web client.
  9. Click OK to see what the form will look like in the Windows client.
  10. Click OK to save your changes.
  11. Open the form using Database Manager to test your changes:
    1. Click Tailoring > Database Manager
    2. Click Search.

      Service Manager opens a list of forms.

    3. Click the form you just created to open it.
Carlos Villalobos R
Customer Support Engineer
If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Add html to form

Ok.

For example i have next html code:

<div style="text-align: center;">
<font color="#0000ff"><b>Welcome&nbsp;</b></font></div>
<div style="text-align: center;"><font color="#0000ff"><b>to</b></font></div>
<div style="text-align: center;"><font color="#0000ff"><b>SelfServicePortal</b></font></div>

Where must i put it (this code) to display result of it on form ?

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Add html to form

Add it to any variable or a field and set the variable/field as input of the HTML viewer.

Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Add html to form

Can you give me some exmple about where can i set for variable my HTML code ?

And what if i need include in this HTML code some value of variables of interaction (interaction.id, status,.....) and some action button (view my interaction, add new interaction,.... - like button on menu.gui.ess.SD wich duplicate left menu action)

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Add html to form

Often it's easiest to learn from OOB examples. Take a look at a form called "configurationItem", open it with Forms Designer.

Check the HTML viewer components under "Pending Relationship changes" and "Historic Relationship Changes". Check how they're done (note fields HTML-Generating Script and input) and also inspect the referenced HTML library.

If you need to pass multiple field values from a current record, the Forms Designer can't help you. In that case, leave its field "Input" blank and refer in your JS code to a variable $L.file - or vars.$L_file (or system.vars.$L_file), as it must be written to be accepted by JS parser.

If you need to pass variables, lets say $test, you can refer to it in JS code with vars.$test.

(Example form taken from SM 9.41)

---
Moving on, this account is no longer active. Best regards, Kelalek
- So Long, and Thanks for All the Fish
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Add html to form

What exactly are you trying to do?  It looks like you're trying to write code for the ess forms using HTML instead of form designer?  With HTML script to handle buttons instead of Display Options (or PD Actions)?  What's the end goal?

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Add html to form

Yes, looks like this is exactly that madness what i need 🙂

this is an attempt to make the interface more modern and attractive - may be this is wrong way.

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Add html to form

Yeah - that's probably not the best way to do what you're hoping to do.

What version of Service Manager are you on?  We're on 9.5, and the look and feel of that is much more modern that our previous version, and I think 9.6 is coming soon (or is already out?)

But, let's say you don't like the way HPE/MF is going, and you want your own front-end.

Rather than try to use their tools and squeeze the front end they provide into some other form, I would recommend building your own front end, and making calls to the app layer using web services.  Where I currently work, we (not me - another team altogether) built a custom self-service portal that uses SOAP to make calls to the app layer to create and update tickets.  They had this front end in place long before they implemented Service Manager, and they still prefer it to the ess or service portal provided by the vendor.

It's a lot of work - it's more than just a pretty front-end; they had to write code that basically replicated functionality that exists OOB - but they have full control over the results.  We still use the UI for working in the tool - teams that get and work the SDs, IMs, ChM, etc - but for customers who just need to report issues or update their tickets, we have our own.

Even MF does; when you submit a ticket via their support site, you're not using their Service Portal, but their own custom front end.  It's Service Manager in the backend, but even they don't seem to want to use their portal.

If you REALLY want to make the front end vastly different than what the vendor provides, you have to take on the responsibility of building your own.  And, if you're going to do that, I'd recommend going all out and building a new front end separate from the tool, and make your calls to the tool via SOAP or REST - especially if it's just the self service portal.

 

Highlighted
Knowledge Partner
Knowledge Partner

Re: Add html to form

I couldn't agree more Jacob.
I worked for a Company who decided to do the same back on Service Center (R.I.P)
9.60 is already out and available for download.
On new projects you should consider use REST instead of SOAP.
Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!
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.