When I click a radio button its value should display in textfield Above is the sample screenshot of my form where I would like to do is:

When I click/check on radio button "One" then its value should display in  textfield of "Display". 

Code:



function test_radio_menu() {
  $items['test_radio'] = array(
    'title' =&gt; 'test_radio',
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('test_radio_form'),
    'access arguments' =&gt; array('access content'),
    'access callback' =&gt; TRUE,
    );
  return $items;
}

/**
* Implements hook_form().
*/

function test_radio_form($form, &amp;$form_submit){

/* the options to display in our form radio buttons */
$options = array(
  'one' =&gt; t('One'),
   'two' =&gt; t('Two'),
);

$form['count'] = array(
  '#title' =&gt; t('Count'),
  '#type' =&gt; 'radios',
  '#options' =&gt; $options,

);

$form['display'] = array(
'#title' =&gt; t('Display'),
'#type' =&gt; 'textfield',
'#value' =&gt; ,
  );

$form['submit'] = array(
'#value' =&gt; t('PROCEED'),
'#type' =&gt; 'submit',
  );

return $form;
}
You should use drupal ajax form 
 try this code

function test_radio_form($form, &amp;$form_submit){

/* the options to display in our form radio buttons */
$options = array(
  'one' =&gt; t('One'),
   'two' =&gt; t('Two'),
);

$form['count'] = array(
  '#title' =&gt; t('Count'),
  '#type' =&gt; 'radios',
  '#options' =&gt; $options,
  '#ajax' =&gt; array(
            'callback' =&gt; 'myid_print_all_submitted_id_callback',
            'wrapper' =&gt; 'myid_print_search_idnumber_wrapper',
  ),

);

$form['display'] = array(
'#title' =&gt; t('Display'),
'#type' =&gt; 'textfield',
'#value' =&gt; isset($form_state['values']['count']) ? $form_state['values']['count'] : '',
'#prefix' =&gt; '&lt;div id="myid_print_search_idnumber_wrapper"&gt;',
'#suffix' =&gt; '&lt;/div&gt;',
  );

$form['submit'] = array(
'#value' =&gt; t('PROCEED'),
'#type' =&gt; 'submit',
  );

return $form;
}
function myid_print_all_submitted_id_callback($form, $form_state)
{
      return $form['display'];
}