just want to change checkbox value while submit I am using drupal 7: 

$form['title']['#tree'] = TRUE;
$form['title']['node_first'] = array(
    '#type' =&gt; 'checkboxes',
    '#options' =&gt; array(
        'value' =&gt; $value-&gt;title,
    ),
);
$form['title']['node_second'] = array(
    '#type' =&gt; 'checkboxes',
    '#options' =&gt; array(
        'value' =&gt; $value2-&gt;title,
    ),
);


i am getting this output after submitting (when first checkbox has been checked) :

    Array
(
    [title] =&gt; Array
        (
            [node_first] =&gt; Array
                (
                    [value] =&gt; value
                )

            [node_second] =&gt; Array
                (
                    [value] =&gt; 0
                )

        )
)


desired output:

Array
(
    [title] =&gt; Array
        (
            [node_first] =&gt; Array
                (
                    [value] =&gt; True
                )

            [node_second] =&gt; Array
                (
                    [value] =&gt; False
                )

        )
)
It should be possible to manipulate the values as desired in a custom validate function. In your form code, add something like this:

$form['#validate'][] = 'mymodule_custom_validate';


The mymodule_custom_validate is a function you could define as such to change the values to booleans, or anything else you need:

function mymodule_custom_validate(&amp;$form, &amp;$form_state) {
  if ($form_state['values']['title']['node_first']['value'] === 'value') {
    $form_state['values']['title']['node_first']['value'] = True;
  }
  else {
    $form_state['values']['title']['node_first']['value'] = False;
  }
  if ($form_state['values']['title']['node_second']['value'] === 'value') {
    $form_state['values']['title']['node_second']['value'] = True;
  }
  else {
    $form_state['values']['title']['node_second']['value'] = False;
  }
}


This is a fairly rudimentary implementation, but hopefully this will lead you in the right direction. You can see in this example how the values can be manipulated before they reach the submit handler.