function node_kaltura_mix_form_alter in Kaltura 5
Same name and namespace in other branches
- 6.2 plugins/node_kaltura_mix/node_kaltura_mix.module \node_kaltura_mix_form_alter()
- 6 plugins/node_kaltura_mix/node_kaltura_mix.module \node_kaltura_mix_form_alter()
Implementation of hook_form_alter().
change the node's add/edit form
In add mode, we want to hide some fields and settings that are not relevant to that mode or can't be gathered at this point
In edit mode we do not change the form
File
- plugins/
node_kaltura_mix/ node_kaltura_mix.module, line 473
Code
function node_kaltura_mix_form_alter($form_id, &$form) {
if ($form_id == 'kaltura_mix_node_form' && !$form['nid']['#value']) {
if (isset($form["type"]) && $form["type"]["#value"] . "_node_form" == $form_id) {
unset($form['submit']);
unset($form['preview']);
unset($form['menu']);
unset($form["log"]);
unset($form["author"]);
unset($form["taxonomy"]);
unset($form["revision_information"]);
//unset($form['comment_settings']);
//unset($form['attachments']);
//unset($form["body_filter"]["kaltura"]);
//unset($form["options"]);
$form_state['storage']['continue'] = TRUE;
$form['buttons']['continue'] = array(
"#type" => "button",
"#value" => "Continue",
"#weight" => 40,
);
}
}
}