You are here

function sheetnode_handler_field_editable::views_form in Sheetnode 7

Same name and namespace in other branches
  1. 7.2 views/sheetnode_handler_field_editable.inc \sheetnode_handler_field_editable::views_form()

File

views/sheetnode_handler_field_editable.inc, line 19
Views handler for sheetnode editable fields.

Class

sheetnode_handler_field_editable
@file Views handler for sheetnode editable fields.

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,
  );
}