function newServiceForm($headingName, $titleName, $infoKey, $type = '') { parent::setHeadings($headingName); parent::setTitles($titleName); //parent::setSortable(false); parent::setDatabase($infoKey); foreach ($type as $id => $value) { if (is_array($value)) { parent::setType($value); } else { parent::setType($type); break; } } return parent::NewForm(6); }
function render_new_accounting_profile() { // Include contact class $content = "<h1>New Accounting Profiles</h1>"; $form = new Form("auto", 2); $heading = array("New Accounting Profile"); $titles = array("Name", "Client", "Traffic Cap.tip.Configured cap or Contracted rate.<br>Examples 100M, 2M, 1G, 155M, 800K", "Notes"); $post_keys = array("Name", "Client", "TrafficCap", "Notes"); $allGroups = Contact::get_groups(); $form->setType($allGroups); // Drop down $fieldType = array("", "drop_down", "", "text_area"); $form->setFieldType($fieldType); $form->setSortable(false); $form->setHeadings($heading); $form->setTitles($titles); $form->setDatabase($post_keys); //set the table size $form->setTableWidth("1024px"); $form->setTitleWidth("20%"); $content .= $form->NewForm(1); return $content; }