Initially there is only drop down menu in the form, when a selection is made I want to display a table in the same form.
$form['blood_group'] = array(
'#type' => 'select',
'#title' => t('Blood Group'),
'#options' => array(
'a+' => 'a +ve',
'b+' => 'b +ve',
'ab+' => 'ab +ve',
'o+' => 'o +ve',
),
'#required' => TRUE,
);
suppose if the user selects a+ i have to show the table containing names of all the people with the same blood group.