function sheetnode_handler_field_editable::views_form in Sheetnode 7.2
Same name and namespace in other branches
- 7 views/sheetnode_handler_field_editable.inc \sheetnode_handler_field_editable::views_form()
Append views form.
File
- views/
sheetnode_handler_field_editable.inc, line 32 - Views handler for sheetnode editable fields.
Class
- sheetnode_handler_field_editable
- Provides a custom sheetnode editable field handler.
Code
function views_form(&$form, &$form_state) {
// Return a form with spreadsheet and a hidden element.
$plugin = $this->view->style_plugin;
$value = socialcalc_save($plugin
->render_sheet());
$form['sheetview'] = array();
$id = 'edit-annotations';
$plugin
->render_inject($value, $id, $form['sheetview'], '#markup');
$form['annotations'] = array(
'#type' => 'hidden',
'#attributes' => array(
'id' => $id,
),
'#weight' => 99,
);
}