References Dialog: Checkboxes
Categories
Component ID
2023957
Component name
References Dialog: Checkboxes
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Component created
Component changed
Component body
Provides support for node or entity references as checkboxes for the references_dialog project.
Implements hook_references_dialog_widgets() to take advantage of all the great work on References Dialog:
function references_dialog_checkboxes_references_dialog_widgets() {
return array(
'options_buttons' => array(
'element_type' => 'container',
'format' => '$label [nid: $entity_id]',
'views_query' => 'references_dialog_node_reference_views_query',
'operations' => array(
'add' => array(
'function' => 'references_dialog_node_reference_add_link',
'title' => t('Add dialog'),
),
),
),
);
}
This sandbox project is out here to share and improve: Currently it makes an assumption about one of the field names for callback.
Status
- Works with API via hook_references_dialog_widgets() to present to parent module references_dialog. This means no contrib module changes were required.
- Adds Create [entity-type] link to the bottom of a configured checkboxes nodereference
- On dialog successful submit and closure, ajax refreshes list of checkboxes
..albeit like crawling through a den of snakes.. - Has a hardcoded fieldname specific to my use case/project
