'date_submitted' => $lead['date_submitted'],
'source' => $lead['source_id']['name'],
);
+ // Add fields for group names
+ if ( $groups ) {
+ foreach ( $groups as $group ) {
+ $out[$group['title']] = '';
+ }
+ }
if ( !$user_can_edit_leads ) {
unset(
$out['source']
}
// Get the record for this Entry.
$entry = $this->editEntry( $this->entryId );
- //echo '<pre>$entry: ' . print_r($entry, true) . '</pre>';
// get the field from the leads table
$leadData = new GlmDataLeads( $this->wpdb, $this->config );
$lead = $leadData->getEntry( $entry['fieldData']['lead_id']['value'] );
- //echo '<pre>$lead: ' . print_r($lead, true) . '</pre>';
// Use the edit view file.
$view = 'edit.html';
$lead_id = $this->wpdb->insert_id;
} else {
$lead_id = $lead['id'];
- echo '<pre>$lead: ' . print_r($lead, true) . '</pre>';
}
if ( !isset( $lead_id ) && !$lead_id ) {
die( 'Fatal Error: Cannot generate lead_id for new leads record' );