public static function get_lead_row($lid, $atts, $fields) { ob_start(); /* * Get our lead information */ $lead = GFAPI::get_entry($lid); /* * Update the created by date */ $lead['date_created_usa'] = date('m/d/Y', strtotime($lead['date_created'])); $lead['date_created'] = date('d/m/Y', strtotime($lead['date_created'])); /* * Loop through the columns */ foreach ($atts['columns'] as $cid) { ?> <td class="gfpdfe_<?php echo $cid; ?> "> <?php if (is_numeric($cid)) { $value = RGFormsModel::get_lead_field_value($lead, $fields[$cid]); echo GFPDFEntryDetail::pdf_get_lead_field_display($fields[$cid], $value, $lead['currency']); } else { echo array_key_exists($cid, $lead) ? $lead[$cid] : ''; } ?> </td> <?php } $html = ob_get_contents(); ob_end_flush(); return $html; }
font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: ; text-align: ; page-break-after:avoid; } </style> <title>Gravity Forms PDF Extended</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <?php foreach ($lead_ids as $lead_id) { $lead = RGFormsModel::get_lead($lead_id); do_action("gform_print_entry_header", $form, $lead); $form_data = GFPDFEntryDetail::lead_detail_grid_array($form, $lead); /* * Add &data=1 when viewing the PDF via the admin area to view the $form_data array */ PDF_Common::view_data($form_data); /* get all the form values */ /*$date_created = $form_data['date_created']; $first_name = $form_data['1.Name']['first']; $last_name = $form_data['1.Name']['last'];*/ //echo print_r($form_data['field'], true); $fundName = $form_data['field']['Fund Name']; $trusteeType = $form_data['field']['Trustee Type']; $attendedBy = ""; $trusteeTrustees = ""; $trusteesDirectors = "";
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <link rel="stylesheet" href="<?php echo GFCommon::get_base_url(); ?> /css/print.css" type="text/css" /> <link rel='stylesheet' href='<?php echo PDF_PLUGIN_URL . 'initialisation/template.css'; ?> ' type='text/css' /> <title>Gravity PDF</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div class="no-style"> <?php /* * Loop through the entries * There is usually only one but you can pass more IDs through the lid URL parameter */ foreach ($lead_ids as $lead_id) { /* load the lead information */ $lead = RGFormsModel::get_lead($lead_id); /* generate the entry HTML */ GFPDFEntryDetail::lead_detail_grid($form, $lead, $config_data['empty_field'], $config_data['html_field'], $config_data['page_names']); } ?> </div> </body> </html>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <link rel="stylesheet" href="<?php echo GFCommon::get_base_url(); ?> /css/print.css" type="text/css" /> <link rel='stylesheet' href='<?php echo PDF_PLUGIN_URL . 'initialisation/template.css'; ?> ' type='text/css' /> <title>Gravity PDF</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div class="two_row"> <?php /* * Loop through the entries * There is usually only one but you can pass more IDs through the lid URL parameter */ foreach ($lead_ids as $lead_id) { /* load the lead information */ $lead = RGFormsModel::get_lead($lead_id); /* generate the entry HTML */ GFPDFEntryDetail::do_lead_detail_grid($form, $lead, $config_data); } ?> </div> </body> </html>
*/ $form = RGFormsModel::get_form_meta($form_id); $stylesheet_location = file_exists(PDF_TEMPLATE_LOCATION . 'template.css') ? PDF_TEMPLATE_URL_LOCATION . 'template.css' : PDF_PLUGIN_URL . 'styles/template.css'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <link rel='stylesheet' href='<?php echo GFCommon::get_base_url(); ?> /css/print.css' type='text/css' /> <link rel='stylesheet' href='<?php echo $stylesheet_location; ?> ' type='text/css' /> <title>Gravity Forms PDF Extended</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div class="no-style"> <?php foreach ($lead_ids as $lead_id) { $lead = RGFormsModel::get_lead($lead_id); GFPDFEntryDetail::lead_detail_grid($form, $lead, $show_empty_fields, $show_html_fields, $show_page_names); } ?> </div> </body> </html>
echo 'N/A'; } ?> </div> <div></div> <hr></hr> <div></div> <?php // loop through all the returned results $e_id = 0; foreach ($all_entries as $entry) { $time_form = RGFormsModel::get_form_meta($the_form); $time_lead = RGFormsModel::get_lead($entry['id']); $time_form_data = GFPDFEntryDetail::lead_detail_grid_array($time_form, $time_lead); $time_lead_id = $_GET['lid']; $array = $time_form_data['list']['1']; //list field ID foreach ($array as $element) { if ($time_lead_id == $element['project']) { $task = $element['task']; if ($task == $_GET['task']) { $employees[$entry[2]]['name'] = $entry[2]; $employees[$entry[2]]['date'][$element['date']] = $element['hours']; $employees[$entry[2]]['total_hours'] += $element['hours']; $e_id++; } } } }
private static function get_form_fields($form) { $fields = array(); foreach ($form['fields'] as $field) { $fields[$field['id']] = $field; } self::$fields = $fields; }
/** * Our software takes the $form and $entry details and converts it to the $form_data array * Set this up so all our functions have access * @group entry-detail */ private function setup_form_data() { $form = RGFormsModel::get_form_meta($this->form_id[0]); $entry = RGFormsModel::get_lead($this->entries[0]); $this->form_data = GFPDFEntryDetail::lead_detail_grid_array($form, $entry); }