Results 1 to 2 of 2

Thread: Retaining formatting for Notes on Accounts/Contacts

  1. #1
    johnschmuff is offline Junior Member
    Join Date
    Feb 2012
    Posts
    6

    Default Retaining formatting for Notes on Accounts/Contacts

    I'll try and explain this best I can... I have a custom page that will output the notes on the account. So simple code looks like this,

    Code:
    $note = new Note();
    $note->retrieve($account) or ($contact)
    
    echo note->description;
    In the edit or view notes the formatting is retained, but if you output it like the above method you get one long string with no line breaks.

    So say this is the example message.

    Name: Smith
    Status: Open

    it outputs like this Name: Smith Status: Open (notice no line breaks) Please can someone point me in the right direction with this?

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Retaining formatting for Notes on Accounts/Contacts

    Replace
    PHP Code:
    echo note->description
    By
    PHP Code:
    echo nl2br($note->description); 
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Accounts, Contacts, Notes
    By djaburg in forum General Discussion
    Replies: 2
    Last Post: 2012-03-11, 04:57 PM
  2. Improting Tasks and Notes for accounts,Contacts and opportunities into SUGARCRM
    By sugarcrm10 in forum Installation and Upgrade Help
    Replies: 5
    Last Post: 2009-11-09, 08:39 AM
  3. HTML formatting in notes module?
    By cwpollock in forum Developer Help
    Replies: 1
    Last Post: 2007-07-19, 04:55 AM
  4. Formatting Flags displayed in Notes View
    By jon_d_wilkinson in forum General Discussion
    Replies: 0
    Last Post: 2005-12-21, 04:29 PM
  5. Formatting Flags displayed in Notes
    By jon_d_wilkinson in forum General Discussion
    Replies: 0
    Last Post: 2005-12-14, 08:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •