<?php
function mymodule_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'contenttype_node_form') {
unset($form['somefield']);
}
}
?>
It works just fine for me. Just change the form identifier and the key of the form field that you are aiming for, and the field should disappear.
Another option would be to hide it with CSS if the input was overridden in the presave anyway.
source
share