Example #1
0
function addLocationForm()
{
    //global all variables
    global $locationForm, $tool;
    $locationInfoKey = array("name", "desc", "country", "province", "city", "address1", "address2", "zip", "group", "notes", "type");
    $fieldType = array(8 => "drop_down", 9 => "text_area", 10 => "drop_down");
    $locationHeader = array("Location Information");
    $locationTitle = array("Name", "Description", "Country", "Province", "City", "Address 1", "Address 2", "Zip Code", "Contact", "Notes", "Location Type");
    $allLocationType = LocationType::get_location_types();
    $allGroups = Contact::get_groups();
    $locationForm->setHeadings($locationHeader);
    $locationForm->setTitles($locationTitle);
    $locationForm->setData($locationInfo);
    $locationForm->setSortable(false);
    $locationForm->setDatabase($locationInfoKey);
    $locationForm->setAddValue("addLocation");
    $locationForm->setType($allGroups);
    $locationForm->setType($allLocationType);
    $locationForm->setFieldType($fieldType);
    echo $locationForm->newLocationForm();
}