I have a text area (long) field. It contains the default value "Text1" & BR() & "Text2".

It never renders the br() tag correctly, the final result is always 'text1 BR() text2'. Field type is text area(long). Setup to display 2 lines.

What am I doing wrong here? I've tried both "text1" & BR() & "Text2" and "Text1"&BR()&"Text2". And according to the documentation it should work.

  • Is it for apex:inputTextarea? Commented Feb 20, 2013 at 12:47
  • Nope, it's just a default formula value for a text field. No apex involved.
    – akarnid
    Commented Feb 20, 2013 at 12:50
  • How do you show the text, where is it broken? At custom vf-page or on the standard layout page? Commented Feb 20, 2013 at 12:54
  • I just tested your code "Text1" & BR() & "Text2" for an account object and it works fine for me. At the account creation standard page i can see an input text (long) with Text1 and Text2 with brake in between. Commented Feb 20, 2013 at 13:10
  • Is this on a standard page or Visualforce?
    – Mike Chale
    Commented Feb 20, 2013 at 13:56

2 Answers 2


Try using + instead of &?

  • 1
    the +did the trick. Thanks @user31! FWIW - this was on standard page layout. No Visualforce at all.
    – akarnid
    Commented Feb 21, 2013 at 14:56
  • woop woop! what you did appears to be fully supported - wanna raise a Case? Commented Feb 21, 2013 at 16:36

If you are using this formula field on a Visualforce page with an apex:outputText try using the escape attribute.

So, something like:

<apex:outputText value="{!Custom_Object__c.Custom_Formula_Field__c}" escape="false"/>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .