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
Jonathan Thornton 4Jonathan Thornton 4 

Carriage Returns not showing up when displayed

Hello everyone,

I'm simply trying to display an address formatted as typed (including carriage returns) into Salesforce on a visualforce page e.g.

As typed:
 
Street Field:         Salesforce Tower
                             415 Mission Street
City:                      San Francisco
State:                    CA           

My requirement is to have it display just like you would expect with the carriage return as typed:

Salesforce Tower
415 Mission Street
San Fracisco, CA

Instead I get:

Salesforce Tower 415 Mission Street
San Francisco, CA

Here is the line of code:
<apex:outputPanel layout="inline" styleclass="block__number" rendered="{!OR(cinfo.RecordType.Name=='Address',cinfo.RecordType.Name=='Phone Number')}">
<apex:outputText escape="false" value="{!IF(cinfo.RecordType.Name=='Address',cinfo.Address__c,cinfo.Phone__c)}"/>
</apex:outputPanel>


Please, any help is greatly appreciated! This should be so simple... Thanks!!

Jonathan
Alain CabonAlain Cabon
Hello,

Did you try: <apex:outputField> instead of  <apex:outputText> ?

Alain
Jonathan Thornton 4Jonathan Thornton 4
I did try that and it still didn't seem to work. It seems to me the proper way to do it is multiple lines for address. Address Line 1, 2, 3 etc. 

Thank you for your response Alain.

Cheers!