After altering form I cannot save changes in nodes In drupal 7:
I have Answer content type and alter the form for that type:

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'answer_node_form') {
    // disabling some fields (ie. #access title field to false)
    // setting defaults values
    // adding one hidden field (that shouldn't be inserted into database)
  }
}


A when I'm trying to submit edit form, the process of PHP takes too much time and Apache restarts.
Do you have any idea what is wrong? Maybe when I send the form, it shouldn't have any additional fields?

I could paste the code but I think it's insignificant.
As @NikhilMohan says, you can't just remove fields like the title; they're required for validation. Event setting #access =&gt; FALSE has strange results in my experience.

What you could do instead, is set a value for the fields you're hiding, and change their #type to 'value'. That way the element will still exist on the server side, and validation/submission won't break.

e.g.

$form['title']['#type'] = 'value';
$form['title']['#value'] = 'Some default value for the title';