private function get_column_value($item, &$val)
 {
     $col_name = $this->column_name;
     if (strpos($col_name, 'frmsep_') === 0) {
         $sep_val = true;
         $col_name = str_replace('frmsep_', '', $col_name);
     } else {
         $sep_val = false;
     }
     if (strpos($col_name, '-_-')) {
         list($col_name, $embedded_field_id) = explode('-_-', $col_name);
     }
     $field = FrmField::getOne($col_name);
     if (!$field) {
         return;
     }
     $atts = array('type' => $field->type, 'truncate' => true, 'post_id' => $item->post_id, 'entry_id' => $item->id, 'embedded_field_id' => 0);
     if ($sep_val) {
         $atts['saved_value'] = true;
     }
     if (isset($embedded_field_id)) {
         $atts['embedded_field_id'] = $embedded_field_id;
         unset($embedded_field_id);
     }
     $val = FrmEntriesHelper::prepare_display_value($item, $field, $atts);
 }
Пример #2
0
</h3>
                        <table class="form-table"><tbody>
                        <?php 
        $first_h3 = '';
    } else {
        ?>
                        <tr>
                            <th scope="row"><?php 
        echo esc_html($field->name);
        ?>
:</th>
                            <td>
                            <?php 
        $embedded_field_id = $entry->form_id != $field->form_id ? 'form' . $field->form_id : 0;
        $atts = array('type' => $field->type, 'post_id' => $entry->post_id, 'show_filename' => true, 'show_icon' => true, 'entry_id' => $entry->id, 'embedded_field_id' => $embedded_field_id);
        echo $display_value = FrmEntriesHelper::prepare_display_value($entry, $field, $atts);
        if (is_email($display_value) && !in_array($display_value, $to_emails)) {
            $to_emails[] = $display_value;
        }
        ?>
                            </td>
                        </tr>
                        <?php 
    }
}
?>

                        <?php 
if ($entry->parent_item_id) {
    ?>
                        <tr><th><?php