You are here

function qcollection_form_alter in Quiz 6.6

Implementation of hook_form_alter().

Override settings in some existing forms. For example, we remove the preview button on a qcollection.

File

includes/qcollection/qcollection.module, line 229
The main file for qcollection.

Code

function qcollection_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'qcollection_node_form') {

    // Remove preview buttons:
    unset($form['buttons']['preview']);
    unset($form['buttons']['preview_changes']);

    // TODO make preview work
  }
}