You are here: Chapter 7: Configuration and Administration > Address Book Administration > Address Book Field Maintenance > Insert HTML/Text Headers

Insert HTML/Text Headers

If you would like to include instructions or other information about Project fields in the Create Issue, Edit Issue, and Submit Request pages, you can optionally insert text or HTML headers above any field.  This feature is also available for Address Book Fields.  In addition, if any of the fields are set to be hidden fields, you can choose to display the HTML/text header even if the field is hidden.  You may want to display the HTML/text header even when the field is hidden if, for instance:

To include custom headers:

  1. Click the Insert HTML/Text Headers Above Fields link.  Each Project field is listed in the table in the pop-up that appears.
  2. Insert text or HTML code before one or more fields as needed.
  3. Click in the checkbox for each field for which you want the text or HTML code to be displayed.  The text or HTML code is not displayed if the checkbox is not checked.  This feature allows the user to create text or HTML code and leave it for later to be displayed or to temporarily disable the text or HTML code.
  4. In the Display column, if you have any fields that are hidden for a particular status, select from the displayed drop-down field. A drop-down is displayed for fields on the Create & Edit Issue pages and a second drop-down provides the same options for the Issue Details page. The drop-down field has the following options:
  5. always—Always show the inserted header regardless of whether the field is hidden.
  6. if field is shown—Show the inserted field header only when the field is visible.
  7. if row is shown—Show the inserted field header only when the row in which the field appears is visible.
  1. After you finish adding headers, click GO.  The page is dismissed and you are returned to the Field Maintenance page.
  2. Enter your password and click GO.

 

Define field headers

Notes on the Field Headers Page

Link a Field Header to a URL

When the following sample Javascripts are entered in the Text or HTML to Insert Above Field field, the field header becomes a link to the URL and the data in the field is passed to the URL.

The following script works for drop-down fields only.  The following sample script uses a field named "Product" for this example.  Use your own field name in place of the word "Product", "url =" must point to the URL to which you want to pass the value, and use the "+prod" where you want to place the value of the field into the URL.

<SCRIPT LANGUAGE="JavaScript"> function ProductInfo(){var prod=document.regform.Product.options[document.regform.Product.selectedIndex].value; var url = '/MRcgi/product.pl?PROD='+prod; var ProductInfo=window.open(url);}</SCRIPT><a href=javascript:ProductInfo();>Click for Product info</a>

The following field works for single-line character fields only.  The example field name is "Company Documentation", and the value of variable "CompanyVal" is what is passed from the text field.  Again, "url =" must point to the URL to which you want to pass the value.

<SCRIPT LANGUAGE="JavaScript"> function CompanyInfo(){ var CompanyVal =document.regform.Company__bDocumentation.value; var url = '/tmp/Attachments/Project7/' + CompanyVal; var CompanyInfo=window.open(url);}</SCRIPT><a href=javascript:CompanyInfo();>Click for Document</a>