EOQ; return $the_script; } /** * Create HTML form to enter a new record with the minimum necessary vtiger_fields. * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. * All Rights Reserved. * Contributor(s): ______________________________________.. */ function get_new_record_form () { global $mod_strings; global $app_strings; global $current_user; global $adb;//for dynamic quickcreateform construction $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL']; $lbl_first_name = $mod_strings['LBL_FIRST_NAME']; $lbl_last_name = $mod_strings['LBL_LAST_NAME']; $lbl_account_name = $mod_strings['LBL_ACCOUNT_NAME']; $lbl_phone = $mod_strings['LBL_PHONE']; $lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS']; $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE']; $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY']; $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL']; $user_id = $current_user->id; $qcreate_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']); $qcreate_get_field="select * from vtiger_field where tabid=4 and quickcreate=0 and vtiger_field.presence in (0,2) order by quickcreatesequence"; $qcreate_get_result=$adb->pquery($qcreate_get_field, array()); $qcreate_get_noofrows=$adb->num_rows($qcreate_get_result); $fieldName_array = Array();//for validation $qcreate_form.='
'; $qcreate_form.=''; $qcreate_form.=''; $qcreate_form.=''; $qcreate_form.=''; $qcreate_form.=''; //$qcreate_form.=''; //$qcreate_form.=''; $qcreate_form.=''; for($j=0;$j<$qcreate_get_noofrows;$j++) { $qcreate_form.=''; $fieldlabel=$adb->query_result($qcreate_get_result,$j,'fieldlabel'); $uitype=$adb->query_result($qcreate_get_result,$j,'uitype'); $tabid=$adb->query_result($qcreate_get_result,$j,'tabid'); $fieldname=$adb->query_result($qcreate_get_result,$j,'fieldname');//for validation $typeofdata=$adb->query_result($qcreate_get_result,$j,'typeofdata');//for validation $qcreate_form .= get_quickcreate_form($fieldlabel,$uitype,$fieldname,$tabid); //to get validationdata //start $fldLabel_array = Array(); $fldLabel_array[$fieldlabel] = $typeofdata; $fieldName_array['QCK_'.$fieldname] = $fldLabel_array; //end $qcreate_form.=''; } //for validation $validationData = $fieldName_array; $fieldName = ''; $fieldLabel = ''; $fldDataType = ''; $rows = count($validationData); foreach($validationData as $fldName => $fldLabel_array) { if($fieldName == '') { $fieldName="'".$fldName."'"; } else { $fieldName .= ",'".$fldName ."'"; } foreach($fldLabel_array as $fldLabel => $datatype) { if($fieldLabel == '') { $fieldLabel = "'".$fldLabel ."'"; } else { $fieldLabel .= ",'".$fldLabel ."'"; } if($fldDataType == '') { $fldDataType = "'".$datatype ."'"; } else { $fldDataType .= ",'".$datatype ."'"; } } } $qcreate_form.='
'; $qcreate_form.=''; $qcreate_form.='
'; $qcreate_form.=''; $qcreate_form .= get_left_form_footer(); return $qcreate_form; } /*function get_new_record_form () { global $mod_strings; global $app_strings; global $current_user; $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL']; $lbl_first_name = $mod_strings['LBL_FIRST_NAME']; $lbl_last_name = $mod_strings['LBL_LAST_NAME']; $lbl_phone = $mod_strings['LBL_PHONE']; $lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS']; $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE']; $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY']; $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL']; $user_id = $current_user->id; $the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']); $the_form .= << $lbl_first_name

$lbl_required_symbol$lbl_last_name

$lbl_phone

$lbl_email_address


EOQ; $the_form .= get_left_form_footer(); $the_form .= get_validate_record_js(); return $the_form; }*/ ?>