Custom Form API elements in node form I am rendering node form on my custom page with such a code:

&lt;?php
 $form_state['build_info']['args'] = array($node);
 form_load_include($form_state, 'inc', 'node', 'node.pages');
 $form = drupal_build_form($type . '_node_form', $form_state);
 return drupal_render($form);
 ?&gt;


I need to add  some custom form elements to the form as follows:

 &lt;?php
  $form['mycode'] = array(
 '#type' =&gt; 'textfield',
 '#title' =&gt; t('My code'),
 );
 ?&gt;


The custom form elements are displayed correctly in the form. The problem is, when I submit the form, I cannot see custom values in $form_state or even $_REQUEST array. 
I am checking $form_state values in the implementation of hook_node_submit

What is the correct way to add custom form elements to node form (except creation of fields) ?
(I need custom form elements because I need to use different field widgets for various user roles. I also need to add checkbox like "I have read Terms and Conditions" into node form.)

thanks
Tomas
You need to use hook_form_alter for this requirement. You can create a submit function for the same &amp; declare it as submit function for previously created alter function. You can access $form_state into that.

In same way you can have your own validate function etc.