Views:

Description

Sets a control notification.

Signature

SetControlNotification('fieldname', 'message' )

Examples

SetControlNotification('accountnumber', 'Please enter an account number')

 

Portal Functionality Signatures

On the Portal, SetControlNotification can be used in 3 ways:

  1. Display a notification on a field
  2. Display a notification on a field that prevents the form from being submitted
  3. Display an image next to a field

Display Notification on a field

SetControlNotification on the Portal accepts a minimum of 2 parameters like the example above. 

SetControlNotification('description', 'You must fill out the description field!')

 

There are additional parameters that enhance the SetControlNotification function on the Portal:

SetControlNotification('fieldname', 'message', 'level', 'fadeout', 'position')

Fadeout

With fadeout specified the message will remain on screen for the specified number of seconds. Without fadeout the message remains unless it is removed with the ClearControlNotification('field') function.

SetControlNotification('casetypecode', 'This type of case requires a description', 'WARNING', '7')

The message will remain on the form for 7 seconds in this example:

Position

Using position (top/below) you can specify if you want the message to appear above or below a specific field on the page.

SetControlNotification('casetypecode', 'This type of case requires a description', 'WARNING', '7', 'top')

The message will appear above the casetypecode field on the portal form.

Display Notification on a field that prevents the form from being submitted

If you use ERROR as the level in your SetControlNotification function it will prevent the form from being submitted.

Below you can see the ERROR control notification on the field:

After trying to submit the form:

Display an image next to a field

You can use the SetControlNotification function to add an image to a field label:

To do this you specify the level parameter of the SetControlNotification to be INFOIMAGE

SetControlNotification('north52_teststring_label', '/images/checkmark', 'INFOIMAGE', '10', 'right')

You must specify the following parameters:

  • 1st Parameter: id of the element you want to put the image next to
  • 2nd Parameter: url of the image (relative URL if has been added as a Web File)
  • 3rd Parameter: INFOIMAGE
  • 4th Parameter (optional): fadeout time
  • 5th Parameter (optional): right or left (which side of the element is the image applied - default is right)

Further image sytle control via CSS

A CSS class name n52notifyimage can be used to apply styles to images shown using the SetControlNotification function. The following is how an image is rendered in the HTML:

<img class="n52notifyimage" src="/Success.gif" id="n52demo_teststringn52image">

 

Microsoft APIs

This North52 function relates to the following Microsoft APIs: