Reference: Data Manager action buttons array for add and edit forms
Reference: Data Manager action buttons array for add and edit forms
The add and edit record forms allow you modify the action button set that appear beneath the form. These modififications expect to either return an array of structs and/or strings, or are passed this array of structs/strings for modification / appending to.
Keys
Each "action" struct can/must have the following keys:
type
(required): Must be either 'link' or 'button'label
(required): Label to show on the buttonhref
(optional): Required whentype=link
- href of the linkname
(optional): Fortype=button
only. Name of the field that is sent with the form submission.value
(optional): Fortype=button
only. Value of the field that is sent with the form submission.class
(optional): Twitter bootstrap button class for the button. e.g.btn-info
,btn-warning
,btn-success
,btn-danger
, etc.iconClass
(optional): Font awesome icon class to use. Icon will be displayed before the label on the button.globalKey
(optional): Global keyboard key shortcut for the button.
Info
Note: alternatively, a button in the array can be a fully rendered string representing the button (should you require something a bit different)
Examples
A link button
{
type = "link"
, href = event.buildAdminLink( objectName=objectName, operation="preview" )
, class = "btn-info"
, label = translateResource( "preside-objects.blog:preview.btn" )
, iconClass = "fa-eye"
}
A regular button:
{
type = "button"
, name = "_postAction"
, value = "saveDraftAndPreview"
, class = "btn-info"
, label = translateResource( "preside-objects.blog:preview.btn" )
, iconClass = "fa-eye"
}