HI Jeffrey,
You can’t do this in the manage database fields, you will need to use a custom template. If you’re good with code, you can also do it by using a callback that alters how the email field is displayed.
Thread Starter
Q2Tech
(@q2tech)
I figured as much but thanks for the confirmation on that.
So as I am attempting to use a custom template to deal with this would you agree the template I am using (pdb-list-default.php) will get the job done?
I am guessing i need to inject an email specific snippet within this:
=====================================================================
<tbody>
<?php while ( $this->have_records() ) : $this->the_record(); // each record is one row ?>
<tr>
<?php while( $this->have_fields() ) : $this->the_field(); // each field is one cell ?>
<td class=”<?php echo $this->field->name ?>-field”>
<?php $this->field->print_value() ?>
</td>
<?php endwhile; // each field ?>
</tr>
<?php endwhile; // each record ?>
</tbody>
=====================================================================
Can i just echo the field from the recordset and either use CSS or IMG SRC to turn the record’s email link into an icon?
Just want to make sure I am at least on the right path here 🙂
The easiest way is to test the field name in the loop and when your email field comes by output your modified link instead of the $this->field->print_value(). You can access the value of the current field with $this->field->value