Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Geoff Baldwin 80 posts 100 karma points
    Oct 14, 2010 @ 12:04
    Geoff Baldwin
    0

    How to display a multiline text box (or simple editor) on separate lines?

    My apologies if this has been answered before but a search didn't reveal anything.

    I have added a property to the site tab of a runway home page for the Company address. I have used both a multiline text box and a simple editor and get the same result.

    On the home page site tab I enter the following into the box:

    Peachy House
    Road Name
    Town
    County
    Post Code

    I then use

    <umbraco:Item runat="server" field="companyAddress" recursive="true" /><br>

    to display the address on a contact page (I have configured the contact page as two columns with Co info on the left and a contact form on the right)

    What I get displayed is:

    Peachy House Road Name Town County
    Post Code

     

    How do I force each line of the field to appear as a separate line on the diaplayed page please?

  • Geoff Baldwin 80 posts 100 karma points
    Oct 14, 2010 @ 12:29
    Geoff Baldwin
    0

    OK OK -- stupid boy!!

    Add <br> to the end of each line!

    I just didn't expect that an end user would be expected to add html?

    Is there no way of seting a <br> as the default if a user types CR??

  • Geoff Baldwin 80 posts 100 karma points
    Oct 21, 2010 @ 14:06
    Geoff Baldwin
    0

    I keep getting robot e-mails asking me if the problem is solved. As I cannot mark it as solved unless someone else posts perhaps some one would post and I'll use it to mark 'solved'!!

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Oct 21, 2010 @ 14:17
    Tom Fulton
    1

    Hi Geoff,

    There's an option in the umbraco:Item tag to convert line breaks to BR's.  When inserting the item it's a checkbox towards the bottom, or just add this attribute:

    <umbraco:Item runat="server" field="companyAddress"  convertLineBreaks="true" recursive="true" /><br>

    Thanks,
    Tom

  • Geoff Baldwin 80 posts 100 karma points
    Oct 21, 2010 @ 14:43
    Geoff Baldwin
    0

    Thanks Tom - problem solved and marked as such!!

Please Sign in or register to post replies

Write your reply to:

Draft