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:
- You use field headers
to break up the Issue Information section into different subsections.
The field may be associated with the first field in this section even
though it really applies to all the fields in that section.
- You use field headers
to put an additional GO button(s) throughout a long Issue Information
section.
- A field header must
be associated with the first field in a row if you want all three fields
to remain on that row. The field header is really above the third field.
If the
first field disappears, the field header above the third field disappears.
To include custom headers:
- Click the Insert
HTML/Text Headers Above Fields link. Each
Project field is listed in the table in the pop-up that appears.
- Insert text or HTML
code before one or more fields as needed.
- 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.
- 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:
- always—Always show
the inserted header regardless of whether the field is hidden.
- if
field is shown—Show
the inserted field header only when the field is visible.
- if
row is shown—Show
the inserted field header only when the row in which the field appears
is visible.
- After you finish
adding headers, click
GO.
The page
is dismissed and you are returned to the Field
Maintenance page.
- Enter your password
and click
GO.
Define field headers
Notes on the Field Headers Page
- The Field
Name field displays the name of the field.
- Check the box in
the Enabled
field to include the header. If
you don't check the box, the content you entered for the field header
remains in this form, but is not displayed when you access the Create
Issue, Edit
Issue, or Submit
Request page.
- The Alignment
drop-down allows you to align the header left, center, or right.
- Enter plain text
or HTML code in the Text
or HTML to Insert Above Field field.
- To start the field
associated with the header on a new line, enter a line break <BR>
at the end of the header.
- With respect to %%Variable%%
expressions, some field data from the Issue can also be used in the field
headers, as follows:
- Issue
Number—%%MRID%%
- Title—%%TITLE%%
- Priority—%%PRIORITY%%
- Status—%%STATUS%%
- Submitter—%%SUBMITTER%%
- Project
ID—%%PROJID%%
- Project
and Address Book fields—%%FIELD
NAME%% where "FIELD NAME" is the name of the field in upper
case.
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>