if (!$permission->Check('other_field', 'enabled') or !($permission->Check('other_field', 'edit') or $permission->Check('other_field', 'edit_own'))) {
    $permission->Redirect(FALSE);
    //Redirect
}
$smarty->assign('title', TTi18n::gettext($title = 'Edit Other Field'));
// See index.php
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'id', 'data')));
$off = new OtherFieldFactory();
$action = Misc::findSubmitButton();
switch ($action) {
    case 'submit':
        Debug::Text('Submit!', __FILE__, __LINE__, __METHOD__, 10);
        $off->setId($data['id']);
        $off->setCompany($current_company->getId());
        $off->setType($data['type_id']);
        $off->setOtherID1($data['other_id1']);
        $off->setOtherID2($data['other_id2']);
        $off->setOtherID3($data['other_id3']);
        $off->setOtherID4($data['other_id4']);
        $off->setOtherID5($data['other_id5']);
        if ($off->isValid()) {
            $off->Save();
            Redirect::Page(URLBuilder::getURL(array('type_id' => $data['type_id']), 'OtherFieldList.php'));
            break;
        }
    default:
        if (isset($id)) {
            BreadCrumb::setCrumb($title);