How to change a custom field on form save In the node type page I've added one Integer field "field_article_rejected".
When in rejected stated it contains 1.

But when a registered user changes and "Saves" it I want to set the value of it to 0.

Also the registered user does not have read/write permission on this field. But if needed I can give the user permission for this field but I'll hide it in "Display fields"

How to do it?

I'm working on Drupal-6.

To explain what I'm doing: I've created an article directory. So an user will log-in and create an article type of page. So now this page will be shown as "Submitted articles" block using views.

But as an admin when I reject it then I want this article to be shown under "Rejected Articles" block to the user. So I want to use field "field_article_rejected". When 0 it means user has sumbitted and when 1 then it means rejected by admin.
You create a custom module that will include hook_form_alter().   Something like this:

function MYMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'article_node_form') {
    global $user;

    if (in_array('admin', array_values($user-&gt;roles))) {
      //admin role is not a default role
      //do nothing
    }
    elseif (in_array('authenticated user', array(values($user-&gt;roles))) {
      //remove editable field and replace it with a label
      $form['article_field_rejected']['#access'] = FALSE;
      $form['article_field_rejected_label'] = array (
         '#type' =&gt; 'item',
         '#default_vale' =&gt;  isset($field['article_field_rejected']['#value']) ? $field['article_field_rejected']['#value'] : '0',
    } 
    else {
     // For everyone else disable field and do not display it
     $form['article_field_rejected']['#access'] = FALSE;
    }     
}


If you don't replace the field with a label, then the use can still alter the value by editing the browser.