$formName = 'form2';
 $form->addHtml("<fieldset>\n");
 $form->addLegend($owner . 's &amp; Tenants', array('style' => 'cursor:pointer', 'onClick' => 'javascript:showHide(\'' . $formName . '\');'));
 $form->addHtml('<div id="' . $formName . '" style="display:none">');
 $form->addHtml($form->addHtml($vendor_table));
 $form->addHtml($form->addHtml($tenant_table));
 //$form->addData($formData2,$_GET);
 //$form->addHtml(renderNotes('access_arrangements',$dea_id,array('viewform'=>2,'label'=>'Access Info')));
 //$form->addHtml($form->addDiv($form->makeField("submit",$formName,"","Save Changes",array('class'=>'submit'))));
 $form->addHtml('</div>');
 $form->addHtml("</fieldset>\n");
 $formName = 'form3';
 $form->addHtml("<fieldset>\n");
 $form->addLegend('Marketing Details', array('style' => 'cursor:pointer', 'onClick' => 'javascript:showHide(\'' . $formName . '\');'));
 $form->addHtml('<div id="' . $formName . '" style="display:none">');
 $form->addData($formData3, $_GET);
 $form->addHtml($form->addDiv($form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit'))));
 $form->addHtml('</div>');
 $form->addHtml("</fieldset>\n");
 $formName = 'form4';
 $form->addHtml("<fieldset>\n");
 $form->addLegend('State of Trade', array('style' => 'cursor:pointer', 'onClick' => 'javascript:showHide(\'' . $formName . '\');'));
 $form->addHtml('<div id="' . $formName . '" style="display:none">');
 if ($dea_status == 'Proofing' && !in_array('Editor', $_SESSION["auth"]["roles"])) {
     $form->addHtml('<p class="appInfo">Submitted to the proofing list. Only Editors can change the status</p>');
     unset($formData4["dea_status"]);
     $form->addData($formData4, $_GET);
     $form->addHtml(renderNotes('sot', $dea_id, array('viewform' => 4, 'label' => 'Status Notes')));
     $buttons = $form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit'));
 } else {
     if (is_array($additional_fields)) {
Example #2
0
if (!$_POST["action"]) {
    // start new form object
    $form = new Form();
    $form->addForm("testForm", "post", $PHP_SELF);
    $form->addHtml("<div id=\"standard_form\">\n");
    $form->addField("hidden", "action", "", "update");
    $form->addField("hidden", "con_id", "", $con_id);
    $form->addField("hidden", "searchLink", "", $searchLink);
    //$form->addHtml('<input type="hidden" name="action" value="update">');
    $form->addHtml('<h1>' . $con_fname . ' ' . $con_sname . '</h1>');
    /////////////////////////////////////////////////////////////////////////////////
    $formName = 'form1';
    $form->addHtml("<fieldset>\n");
    $form->addHtml('<div class="block-header"><u>C</u>ontact</div>');
    $form->addHtml('<div id="' . $formName . '">');
    $form->addData(${$formName}, $_POST);
    $form->addHtml($form->addDiv($form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit'))));
    $form->addHtml("</div>\n");
    $form->addHtml("</fieldset>\n");
    /////////////////////////////////////////////////////////////////////////////////
    $formName = 'form2';
    $form->addHtml("<fieldset>\n");
    $form->addHtml('<div class="block-header"><u>A</u>ddress</div>');
    $form->addHtml('<div id="' . $formName . '">');
    // show old address from import
    if ($con_oldaddr && !$render_addresses) {
        $form->addHtml($form->addRow('textarea', 'con_oldaddr', 'Old Address', $con_oldaddr, array('style' => 'width:400px', 'readonly' => 'readonly'), '', 'Please re-enter this address into the form below'));
    }
    // add address table
    $form->addHtml($render_addresses);
    // add new address
                #$form->addHtml($form->addDiv($form->makeField("button","","","Create New Client",array('class'=>'submit','onClick'=>'location.href=\''.$goto_notfound.'?'.http_build_query($terms).'&dest='.$_GET["dest"].'\';'))));
                $form->addHtml("</fieldset>\n");
                $form->addHtml("</div>\n");
            }
            $form2 = new Form();
            $form2->addForm("form", "post", $PHP_SELF);
            $form2->addHtml("<div id=\"standard_form\">\n");
            $form2->addField("hidden", "stage", "", "2");
            $form2->addField("hidden", "action", "", "new_client");
            $form2->addField("hidden", "dest", "", $_GET["dest"]);
            $form2->addField("hidden", "dea_id", "", $_GET["dea_id"]);
            $form2->addField("hidden", "app_id", "", $_GET["app_id"]);
            $form2->addField("hidden", "carry", "", $_GET["carry"]);
            $form2->addHtml("<fieldset>\n");
            $form2->addLegend('New Client');
            $form2->addData($formData1, $_GET);
            $form2->addRow('radio', 'p2c_type', 'Address Type', 'Home', '', db_enum("pro2cli", "p2c_type", "array"));
            if (!$_GET["pro_pro_id"]) {
                $form2->ajaxPostcode("by_freetext", "pro");
            } else {
                $form2->addData($formData2, $_GET);
                $form2->addHtml($form2->addDiv($form->makeField("submit", "", "", "Save Changes", array('class' => 'submit'))));
            }
            $form2->addHtml("</fieldset>\n");
            $form2->addHtml("</div>\n");
            $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $return), 'search' => array('title' => 'Client Search', 'label' => 'Client Search', 'link' => 'client_search.php'));
            $navbar = navbar2($navbar_array);
            $additional_js = '
function validateForm() {
if (document.forms.existing_clients_form.cli_id.value == "") {
alert(\'You must select a client from the list\');
    $attributes = array('class' => 'wide', 'readonly' => 'readonly');
    $info = '<p class="appInfo">This is a Royal Mail address, all you can edit is the Area</p>';
}
$formData1 = array('pro_addr1' => array('type' => 'text', 'label' => 'House/Flat Number', 'value' => $pro_addr1, 'attributes' => $attributes, 'required' => 2, 'function' => 'format_street'), 'pro_addr2' => array('type' => 'text', 'label' => 'Building Name', 'value' => $pro_addr2, 'attributes' => $attributes, 'function' => 'format_street'), 'pro_addr3' => array('type' => 'text', 'label' => 'Street', 'value' => $pro_addr3, 'attributes' => $attributes, 'required' => 2, 'function' => 'format_street'), 'pro_area' => array('type' => 'select', 'label' => 'Area', 'value' => $pro_area, 'attributes' => array('class' => 'wide'), 'options' => $areas), 'pro_addr5' => array('type' => 'text', 'label' => 'City or County', 'value' => $pro_addr5, 'attributes' => $attributes, 'required' => 2, 'function' => 'format_street'), 'pro_country' => array('type' => 'select', 'label' => 'Country', 'value' => $pro_country, 'attributes' => $attributes, 'options' => $countries), 'pro_postcode' => array('type' => 'text', 'label' => 'Postcode', 'value' => $pro_postcode, 'attributes' => $attributes, 'required' => 2, 'function' => 'format_postcode'), 'pro_authority' => array('type' => 'text', 'label' => 'Local Authority', 'value' => $pro_authority, 'attributes' => $attributes), 'pro_east' => array('type' => 'text', 'label' => 'Easting', 'value' => $pro_east, 'attributes' => $attributes), 'pro_north' => array('type' => 'text', 'label' => 'Northing', 'value' => $pro_north, 'attributes' => $attributes), 'pro_latitude' => array('type' => 'text', 'label' => 'Latitude', 'value' => $pro_latitude, 'attributes' => $attributes), 'pro_longitude' => array('type' => 'text', 'label' => 'Longitude', 'value' => $pro_longitude, 'attributes' => $attributes));
if (!$_GET["action"]) {
    $form = new Form();
    $form->addForm("app_form", "GET", $PHP_SELF);
    $form->addHtml("<div id=\"standard_form\" style=\"width:700px; float:left\">\n");
    $form->addField("hidden", "action", "", "update");
    $form->addField("hidden", "pro_id", "", $pro_id);
    $form->addField("hidden", "searchLink", "", urlencode($searchLink));
    $form->addHtml("<fieldset>\n");
    $form->addHtml('<div class="block-header">Edit Address</div>');
    $form->addHtml($info);
    //$form->addHtml($form->addRow("radio","saveas","Action","Save",array(),array('Save'=>'Save','Add as New'=>'Add as New')));
    $form->addData($formData1, $_GET);
    //if ($pro_pcid == '-1') {
    $form->addHtml($form->addDiv($form->makeField("submit", "submit", "", "Save Changes", array('class' => 'submit'))));
    //	}
    $form->addHtml("</fieldset>\n");
    $form->addHtml("</div>\n");
    $form->addHtml('<div style="padding-top: 30px;"><div id="map" style="width:500px; height:435px;"></div></div>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">

var lat = document.getElementById("pro_latitude").value || 51.471952345537105;
var lng = document.getElementById("pro_longitude").value || -0.08856922388076782;
if(lat && lng) {
var latlng = new google.maps.LatLng(lat, lng);
			var myOptions = {
				zoom      : 16,
 $formData = array('dea_ptype' => array('type' => 'select_multi', 'label' => 'Property Type', 'required' => 2, 'options' => array('dd1' => $ptype['dd1'], 'dd2' => $ptype['dd2'])), 'dea_bedroom' => array('type' => 'select_number', 'label' => 'Bedrooms', 'value' => $dea_bedroom, 'attributes' => array('class' => 'narrow'), 'options' => array('blank' => 'blank')), 'dea_reception' => array('type' => 'select_number', 'label' => 'Receptions', 'value' => $dea_reception, 'attributes' => array('class' => 'narrow'), 'options' => array('blank' => 'blank')), 'dea_bathroom' => array('type' => 'select_number', 'label' => 'Bathrooms', 'value' => $dea_bathroom, 'attributes' => array('class' => 'narrow'), 'options' => array('blank' => 'blank')), 'dea_floor' => array('type' => 'select', 'label' => 'Floor', 'value' => $dea_floor, 'options' => join_arrays(array(array('blank' => ''), db_enum("deal", "dea_floor", "array"))), 'attributes' => array('class' => 'medium')), 'dea_floors' => array('type' => 'select_number', 'label' => 'Floors', 'options' => array('blank' => '', 'min' => '1'), 'value' => $dea_floors, 'attributes' => array('class' => 'narrow')));
 // remove area from the equation
 #$formData = join_arrays(array($formDataArea,$formData));
 if (!$_GET["action"]) {
     // start new form object
     $form = new Form();
     $form->addForm("form", "get", $PHP_SELF);
     $form->addHtml("<div id=\"standard_form\">\n");
     $form->addField("hidden", "stage", "", "particulars");
     $form->addField("hidden", "action", "", "update");
     $form->addField("hidden", "cli_id", "", $cli_id);
     $form->addField("hidden", "pro_id", "", $pro_id);
     $form->addField("hidden", "dea_id", "", $dea_id);
     $form->addHtml("<fieldset>\n");
     $form->addLegend('Property Particulars');
     $form->addData($formDataArea, $_GET);
     $form->addData($formData, $_GET);
     $form->addHtml($form->addDiv($form->makeField("submit", "", "", "Save Changes", array('class' => 'submit'))));
     $form->addHtml("</fieldset>\n");
     $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $searchLink), 'search' => array('title' => 'Property Search', 'label' => 'Property Search', 'link' => 'property_search.php'));
     $navbar = navbar2($navbar_array);
     $page->setTitle("New Instruction");
     $page->addStyleSheet('css/styles.css');
     $page->addScript('js/global.js');
     $page->addScript('js/scriptaculous/prototype.js');
     $page->addScriptDeclaration($ptype['js']);
     $page->setBodyAttributes(array('onLoad' => $ptype['onload']));
     $page->addBodyContent($header_and_menu);
     $page->addBodyContent('<div id="content">');
     $page->addBodyContent($navbar);
     $page->addBodyContent($render);
Example #6
0
     $attribute_array_pc = array('class' => 'pc', 'maxlength' => 9, 'readonly' => 'readonly');
 }
 $formData2 = array('pro_pcid' => array('type' => 'hidden', 'value' => $pro_pcid), 'pro_addr1' => array('type' => 'text', 'label' => 'House Number', 'value' => $pro_addr1, 'required' => 2, 'attributes' => $attribute_array, 'function' => 'format_street'), 'pro_addr2' => array('type' => 'text', 'label' => 'Building Name', 'value' => $pro_addr2, 'required' => 1, 'attributes' => $attribute_array, 'function' => 'format_street'), 'pro_addr3' => array('type' => 'text', 'label' => 'Street', 'value' => $pro_addr3, 'required' => 2, 'attributes' => $attribute_array, 'function' => 'format_street'), 'pro_addr4' => array('type' => 'text', 'label' => 'Town or Area', 'value' => $pro_addr4, 'required' => 3, 'attributes' => $attribute_array, 'function' => 'format_street'), 'pro_addr5' => array('type' => 'text', 'label' => 'City or County', 'value' => $pro_addr5, 'required' => 2, 'attributes' => $attribute_array, 'function' => 'format_street'), 'pro_postcode' => array('type' => 'text', 'label' => 'Postcode', 'value' => $pro_postcode, 'required' => 2, 'attributes' => $attribute_array_pc, 'function' => 'format_postcode', 'group' => 'Postcode'), 'pro_postcode_change' => array('type' => 'button', 'label' => 'Postcode', 'value' => 'Change Address', 'group' => 'Postcode', 'attributes' => array('class' => 'button', 'onClick' => 'javascript:resetDirectoryAddress(' . $dir_id . ');'), 'last_in_group' => 1));
 // form is not submitted, show the form
 if (!$_POST["action"]) {
     // start new form object
     $form = new Form();
     $form->addForm("form", "post", $PHP_SELF, "multipart/form-data");
     $form->addHtml("<div id=\"standard_form\">\n");
     $form->addField("hidden", "action", "", "update");
     $form->addField("hidden", "dir_id", "", $dir_id);
     $form->addField("hidden", "pro_id", "", $pro_id);
     /////////////////////////////////////////////////////////////////////////////////
     $form->addHtml("<fieldset>\n");
     $form->addLegend('Edit Entry');
     $form->addData($formData1, $_POST);
     $form->addHtml("</fieldset>\n");
     /////////////////////////////////////////////////////////////////////////////////
     $form->addHtml("<fieldset>\n");
     $form->addLegend('Address');
     if (!$pro_pcid) {
         $form->ajaxPostcode("by_freetext", "pro");
     } else {
         $form->addData($formData2, $_POST);
         $form->addHtml($form->addDiv($form->makeField("submit", "", "", "Save Changes", array('class' => 'submit'))));
     }
     $form->addHtml("</fieldset>\n");
     $form->addHtml("</div>\n");
     // start a new page
     $page = new HTML_Page2($page_defaults);
     $page->setTitle("Directory > Edit");
Example #7
0
        $additional_fields = array();
        break;
}
$formData1 = array('dea_status' => array('type' => 'select', 'label' => 'Status', 'value' => $dea_status, 'options' => $statuses, 'attributes' => array('readonly' => 'readonly', 'style' => 'width:300px')));
$formData2 = array('sot_notes' => array('type' => 'textarea', 'label' => 'Notes', 'value' => $sot_notes, 'attributes' => array('style' => 'width:400px;height:80px')));
if (!$_GET["action"]) {
    $form = new Form();
    $form->addForm("", "GET", $PHP_SELF);
    $form->addHtml("<div id=\"standard_form\">\n");
    $form->addField("hidden", "action", "", "update");
    $form->addField("hidden", "dea_id", "", $dea_id);
    $form->addField("hidden", "return", "", urlencode($_GET["return"]));
    $form->addHtml("<fieldset>\n");
    $form->addHtml('<div class="block-header">Change Status</div>');
    #$form->addHtml($form->addLabel('current_status','Current status',$form->makeField("text","","",$dea_status,array('class'=>'inputInvisible'))));
    $form->addData($formData1, $_GET);
    if (is_array($additional_fields)) {
        $form->addData($additional_fields, $_GET);
    }
    $form->addData($formData2, $_GET);
    $form->addHtml($form->addDiv($form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit'))));
    $form->addHtml("</fieldset>\n");
    /*
    $render = '
    <div id="content">
    <h3>Status change to "'.$sot.'"</h3>
    <form method="get">
    <input type="hidden" name="submitted" value="yes">
    <input type="hidden" name="dea_id" value="'.$dea_id.'">
    <input type="hidden" name="sot" value="'.$sot.'">
    <input type="hidden" name="return" value="'.$_GET["return"].'">
 if (!$_GET["action"]) {
     // start new form object
     $form = new Form();
     $form->addForm("form", "get", $PHP_SELF);
     $form->addHtml("<div id=\"standard_form\">\n");
     $form->addField("hidden", "action", "", "update");
     $form->addField("hidden", "cli_id", "", $cli_id);
     $form->addField("hidden", "app_id", "", $app_id);
     /////////////////////////////////////////////////////////////////////////////////
     $form->addHtml('<div>');
     $form->addHtml("<fieldset>\n");
     $form->addHtml('<div class="block-header">Viewer Details</div>');
     $form->addHtml($reason);
     //$form->addHtml($form->addDiv($form->makeField("button","","","Skip",array('class'=>'submit','onClick'=>'document.location.href = \'calendar.php?app_id='.$_GET["app_id_carry"].'\''))));
     if ($formData0) {
         $form->addData($formData0, $_GET);
     }
     $form->addData($formData1, $_GET);
     $form->addHtml($form->addDiv($form->makeField("submit", "toHide", "", "Save Changes", array('class' => 'submit'))));
     $form->addHtml("</fieldset>\n");
     $form->addHtml('</div>');
     /////////////////////////////////////////////////////////////////////////////////
     if ($cli_sales != 'Yes') {
         $sales_visible = "none";
     }
     $form->addHtml('<div id="sale" style="display:' . $sales_visible . '">');
     $form->addHtml("<fieldset>\n");
     $form->addHtml('<div class="block-header">Sales Requirements</div>');
     $form->addHtml($form->addLabel('cli_saleptype', 'Houses', $ptype_sale['house'], 'javascript:checkAll(document.forms[0], \'sale1\');'));
     $form->addHtml($form->addLabel('cli_saleptype', 'Apartments', $ptype_sale['apartment'], 'javascript:checkAll(document.forms[0], \'sale2\');'));
     $form->addHtml($form->addLabel('cli_saleptype', 'Others', $ptype_sale['other'], 'javascript:checkAll(document.forms[0], \'sale3\');'));
}
$form6 = array('cli_branch' => array('type' => 'select', 'label' => 'Branch', 'required' => 2, 'options' => $branches, 'attributes' => array('style' => 'width:250px'), 'value' => $_SESSION["auth"]["use_branch"]), 'cli_neg' => array('type' => 'select_neg', 'label' => 'Negotiator', 'required' => 2, 'attributes' => array('style' => 'width:250px'), 'value' => $_SESSION["auth"]["use_id"]), 'cli_notes' => array('type' => 'textarea', 'label' => 'General Notes', 'required' => 2, 'attributes' => array('style' => 'width:450px;height:150px;')));
if (!$_POST) {
    // start new form object
    $form = new Form();
    $form->addForm("testForm", "post", $PHP_SELF);
    $form->addHtml("<div id=\"standard_form\">\n");
    $form->addField("hidden", "action", "", "update");
    $form->addField("hidden", "cli_id", "", $cli_id);
    $form->addField("hidden", "searchLink", "", $searchLink);
    //$form->addHtml('<input type="hidden" name="action" value="update">');
    $form->addHtml('<h1>New Client Questionaire</h1>');
    $form->addHtml("<fieldset>\n");
    $form->addHtml('<div class="block-header">Personal Details</div>');
    $form->addHtml('<div>');
    $form->addData($form1, $_POST);
    $form->addHtml("</div>\n");
    $form->addHtml("</fieldset>\n");
    $form->addHtml("<fieldset>\n");
    $form->addHtml('<div class="block-header">Address</div>');
    $form->addHtml('<div>');
    $form->addData($form2, $_POST);
    $form->addHtml("</div>\n");
    $form->addHtml("</fieldset>\n");
    $form->addHtml("<fieldset>\n");
    $form->addHtml('<div class="block-header">Living position</div>');
    $form->addHtml('<div>');
    $form->addData($form3, $_POST);
    $form->addHtml("</div>\n");
    $form->addHtml("</fieldset>\n");
    $form->addHtml("<fieldset>\n");
Example #10
0
    $viewForm = 4;
    $formData = array('med_title' => array('type' => 'select', 'label' => 'Title', 'value' => $med_title, 'required' => 2, 'attributes' => array('style' => 'width:320px'), 'options' => $floorplan_titles), 'med_dims' => array('type' => 'text', 'label' => 'Area', 'value' => $med_dims, 'required' => 1, 'attributes' => array('style' => 'width:120px'), 'group' => 'Area'), 'med_measurement' => array('type' => 'radio', 'label' => 'Area', 'default' => 'mtr&sup2;', 'required' => 1, 'options' => array('mtr&sup2;' => 'metres', 'ft&sup2;' => 'feet'), 'group' => 'Area', 'last_in_group' => 1));
}
if (!$_POST["action"]) {
    $form = new Form();
    $form->addForm("", "POST", $PHP_SELF, "multipart/form-data");
    $form->addHtml("<div id=\"standard_form\">\n");
    $form->addField("hidden", "stage", "", "1");
    $form->addField("hidden", "action", "", "update");
    $form->addField("hidden", "dea_id", "", $dea_id);
    $form->addField("hidden", "med_id", "", $med_id);
    $form->addField("hidden", "searchLink", "", urlencode($searchLink));
    $form->addHtml("<fieldset>\n");
    //$form->addLegend('Edit '.$med_title);
    $form->addHtml('<div class="block-header">Edit ' . $med_title . '</div>');
    $form->addData($formData, $_POST);
    $form->addHtml($form->addDiv($form->makeField("submit", "", "", "Save Changes", array('class' => 'submit'))));
    if ($med_type == "Photograph") {
        foreach ($thumbnail_sizes as $dims => $ext) {
            $dim = explode('x', $dims);
            $width = $dim[0];
            $height = $dim[1];
            if (file_exists($image_path_property . str_replace('.jpg', '_' . $ext . '.jpg', $med_file))) {
                $form->addHtml('<div align="center"><img src="' . $image_url_property . str_replace('.jpg', '_' . $ext . '.jpg', $med_file) . '" border="1" /></div>');
            }
        }
    } else {
        $form->addHtml('<div align="center"><img src="' . $image_url_property . str_replace('.jpg', '_' . $ext . '.jpg', $med_file) . '" border="1" /></div>');
    }
    $form->addHtml("</fieldset>\n");
    $navbar_array = array('back' => array('title' => 'Back', 'label' => 'Back', 'link' => $searchLink), 'search' => array('title' => 'Property Search', 'label' => 'Property Search', 'link' => 'property_search.php'));
 $form->addHtml("<div id=\"standard_form\">\n");
 $form->addField("hidden", "stage", "", "1");
 $form->addField("hidden", "action", "", "update");
 $form->addField("hidden", "dea_id", "", $dea_id);
 $form->addField("hidden", "pro_id", "", $pro_id);
 $form->addField("hidden", "last_order_photo", "", $photoCount);
 $form->addField("hidden", "last_order_floorplan", "", $floorplanCount);
 $form->addField("hidden", "last_order_epc", "", $epcCount);
 $form->addField("hidden", "searchLink", "", urlencode($searchLink));
 $form->addHtml('<h1>' . $pro_addr . ' (' . $dea_type . ')</h1>');
 $formName = 'form1';
 $form->addHtml("<fieldset>\n");
 $form->addHtml('<div class="block-header">Particulars</div>');
 $form->addHtml('<div id="' . $formName . '">');
 if (!$pro_area) {
     $form->addData($formDataArea, $_POST);
 }
 $form->addData($formData1, $_POST);
 $form->addHtml($form->addRow('textarea', 'dea_notes_production', 'Add Production Note', '', array('class' => 'noteInput'), '', ''));
 $form->addHtml(renderNotes('deal_production', $dea_id, array('viewform' => '1', 'label' => 'Production Notes')));
 $buttons = $form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit'));
 $buttons .= $form->makeField("button", "", "", "Summary", array('class' => 'button', 'onClick' => 'document.location.href=\'deal_summary.php?dea_id=' . $dea_id . '\''));
 $buttons .= $form->makeField("button", "", "", "Copy", array('class' => 'button', 'onClick' => 'document.location.href=\'deal_copy.php?dea_id=' . $dea_id . '\''));
 $form->addHtml($form->addDiv($buttons));
 $form->addHtml('</div>');
 $form->addHtml("</fieldset>\n");
 $formName = 'form2';
 $form->addHtml("<fieldset>\n");
 $form->addHtml('<div class="block-header">Descriptions</div>');
 $form->addHtml('<div id="' . $formName . '" style="">');
 $form->addData($formData2, $_POST);