function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RatherGeekyRatherGeeky 

How do I remove formatting of email field in Visualforce page rendering as a PDF?

I've got a visualforce page rendering as a PDF that is pulling in some contact details from a junction object, including Email address.

 

It looks like this:

 

screen capture

 

I'd like to strip the formatting of the text - no hyperlink, no 'Gmail' text.

 

My code looks like this:

 

          <apex:column >

              <apex:facet name="header">Email</apex:facet>
              <apex:outputField value="{!c.role.Contact_Name__r.Email}" />

          </apex:column>

 

 

Any tips?

Best Answer chosen by Admin (Salesforce Developers) 
Ritesh AswaneyRitesh Aswaney

Hey Jenna

 

apex:outputField binds directly to the field on the record - including the type, et all


Using outputText will get rid of the formatting

 

So,

<apex:outputText value="{!c.role.Contact_Name__r.Email}" />

All Answers

Ritesh AswaneyRitesh Aswaney

Hey Jenna

 

apex:outputField binds directly to the field on the record - including the type, et all


Using outputText will get rid of the formatting

 

So,

<apex:outputText value="{!c.role.Contact_Name__r.Email}" />
This was selected as the best answer
Kevin SwiggumKevin Swiggum

Try using

 

<apex:outputText value="{!c.role.Contact_Name__r.Email}" />

 

The outputField tag includes formatting features...but outputText should just output the straight text without formatting

 

RatherGeekyRatherGeeky

Thanks guys! That did the trick!