function parliament_history_form(&$node) {
//keep hold of current tab
//this is so that it doesnt jump to
//first tab when pae is refreshed or previewed
$pjscript = '$(document).ready(function(){
$("#example > ul").tabs();
});';
$form['personal'] =
array(
'#type' => 'fieldset',
'#tree' => TRUE,
//the class sets it up as a tab
//creae the tab buttons with with the <ul> each tab seperated by <il> tags
//each tab is defined by <div> an the appropriate id.
'#prefix'=>' <div id="example" class="drupal-tabs">
<ul class="anchors">
<li><a href="#names">Names</a></li>
<li><a href="#dates_address">DoB & Address</a></li>
</ul>
<div id="names">');
$form['personal']['title_before'] =
array(
'#type' => 'select',
'#default_value' => $node->title_after,
'' => 'Select title',
'Hon.' => 'Hon',
'Lord' => 'Lord',
'Sir' => 'Sir',
),
);
$form['personal']['surname'] =
array(
'#type' => 'textfield',
'#default_value' => $node->surname,
);
$form['name_footnote']['note'] =
array(
'#type' => 'textarea',
'#default_value' => $node->name_footnote,
);
'#type' => 'fieldset',
'#tree' => TRUE,
//close the old tab and start the new tab
'#prefix' => '</div><div id="dates_address">'
);
$form['dates']['dob']['markup'] =
array(
'#type' => 'item',
);
$form['dates']['dob']['prefix'] =
array(
'#type' => 'select',
'#default_value' => $node->dob_prefix,
'' => '',
'aft' => 'aft',
'bef' => 'bef',
'c' => 'c',
'd' => 'd',
'?' => '?',
'?c' => '?c',
),
);
$form['dates']['dob']['year'] =
array(
'#type' => 'textfield',
'#title' => 'year (yyyy)',
'#default_value' => $node->dob,
'#suffix'=>'</div>',
);
return $form;
}