Copied to clipboard

Flag this post as spam?

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


  • Steve Morgan 1278 posts 4216 karma points c-trib
    Aug 14, 2018 @ 11:05
    Steve Morgan
    0

    Multi line default value in text area

    Is there a magic string to do a new line?

    I tried /n \n <br> &#13;&#10; running out of guesses!

    I basically want a pre-prepared message in a contact form multiline / long text field.

    Hi, 
    
    Some text here.
    
  • Steve Morgan 1278 posts 4216 karma points c-trib
    Aug 16, 2018 @ 10:39
    Steve Morgan
    100

    Ended up editing the FieldType.TextArea.cshtml markup...

    >@(Model.Value.Replace("\\n", Environment.NewLine))</textarea>
    

    Now any \n instances will be replaced.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies