The
SBM
JavaScript library is automatically included with every custom form. You do not
need to do anything to access this library.
JavaScript can be added to a custom form in two ways:
- Importing or editing a JavaScript file, adding it to the process app,
and then adding it to a custom form. The advantage of using this method is that
you can reuse the file in several forms.
- Adding an HTML/JavaScript widget with the content of
<script>[your
content]</script> to a custom form. The advantage of
using this method is that you can quickly edit and test the widget on a custom
form, and later move its content to a JavaScript file to reuse on other custom
forms.
After you create a JavaScript file, you can import it by adding it to
your custom form from the
JavaScripts tab in the Property Editor for a form
in
SBM Composer.
Tip: You can define form actions in
SBM Composer
in an intuitive, condition-driven interface that allows you to include dynamic
behavior in custom forms without JavaScript programming. For more information,
see
Using Form Actions.
CAUTION:
The
SBM
JavaScript library and form actions are incompatible with the
Use Accessible Interface User Profile display
option in the
SBM User Workspace.
Tips for Working with Fields
- Field names can be either the
Name or
Database field name specified in the Property
Editor for the field. They can also be the name of a button or widget or other
non-field control. The names must match the names in the Property Editor (for
example, a
Database field name must must be uppercase and
cannot have spaces).
- When working in an environment where the field display names change
often, it is best to use the
Database field name.
- Forms must have fields visible and editable before you can use
methods such as
ShowField,
HideField,
EnableField, and
DisableField. The JavaScript does not override what
is set at the field or form level; it filters the form as it is.
Copyright © 2007–2016 Serena Software, Inc. All rights reserved.