Form Actions
Overview
Form Actions are shown in components rendered by the FormBarFactory. If there are to many actions for the available width, the overflowing actions will collapse into a Dropdown.
inPoint.Web comes pre-packaged with an extensive list of Form Actions, you can:
- override any one of those or
- add your custom ones
See Configuration for setting this up.
Definition
A FormAction executes a Command Action. Like an Item Action it can target specific views, can define its shouldBeVisible conditions, icon, label and description and be targeted by its unique id.
id
This is used to uniquely identify a Form Action
icon
Choose any Fontawesome 6 icon identifier to be rendered as an icon.
name
Label of the Form Action that will be displayed
views
You can target all available views for Item Actions
documentDocument Classification FormdocmodalDocModal Classification FormfolderFolder Classification Form
and specific views for Form Actions
archive_targetArchive Target HeaderuploadUpload Classification FormitemflowsItemFlows Classification FormsearchSearch Formsearch_scopeSearch Scope Barlock_infoLock Info for locked documents
shouldBeVisible
You can specify a list of conditions when a specific action should be visible to the user. The conditions are pre-defined and available in any combination.
- You can combine as many as you need
- You can negate a condition by prefixing it with
! - All conditions must be met for the
Form Actionto be displayed.
You can use all available shouldBeVisible conditions from Item Actions.
hasContext
Additional to the available contexts for Item Actions the following context is available for specific views.
- For all
Item Actionviews you can check forhasContext:isEdit, to differentiate between Classification Form Headers in View or Edit Mode. - For
searchSearch Form view, you can check forhasContext:showSearchScopeandhasContext:showSearchOperators. - Most of the components rendered by the
FormBarFactory, you can check forhasContext:onClearandhasContext:onCancel.
Note: This contexts are not final and might change in the future.
Example
{
"id": "custom_id",
"icon": "folder-o",
"title": { "en": "Label" },
"description": { "en": "Tooltip shown on hover" },
"views": ["folder"],
"commandAction": {
"name": "link",
"props": {
"url": "//example.tld?itemUri={itemUri}"
}
},
},
Reference
Following pre-defined Action ids are currently available:
searchForm_operator
Toggles the visibility of the search form operator
searchForm_scope
Toggles the visibility of the search scope bar
search_scope
Opens a Picker to select a search scope
unlock
Unlocks a document
doc_editClassification
Toggles the Edit Mode of a documents classification form
folder_editClassification
Toggles the Edit Mode of a folders classification form
edit_form_clear
Clears the form in edit mode
edit_form_cancel
Cancels the form in edit mode
view_form_clear
Clears the form in view mode
view_form_cancel
Cancels the form in view mode