solved Question about text string for custom form field in Audio Form

iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
Question,
I have created a custom form field in the Audio form called "audio_desc" so that users of my site can add tracklists and audio descriptions to their audio.

I can display the text on the audio_details tpl using {$item.audio_desc} no issues there.

But, what I want to do is give them the ability to copy/paste (say) a tracklist from a Notepad or Word document into that textarea box. That list will contain carriage returns, in the case where they are typing out a tracklisting.

What happens is, when that is entered into the textarea box, it displays with carriage returns just fine. After saving and viewing the audio_details, it puts everything in one line (removes the carriage returns).

I tried the following validations: a string, string with printable chars... , string numbers, letters, spaces...
I tried the following types: editor, textarea

When I use the at the end of each line, it successfully does a carriage return, which tells me the textarea is using HTML.

How can I achieve a simple way to have the user copy/paste text into that textarea without having to use HTML, but allow it to retain the characteristics of the source text (specifically carriage returns).

TIA!
Brian
updated by @ilovehousemusic: 05/15/14 03:31:08AM
paul
@paul
10 years ago
4,326 posts
Try changing the custom field from 'textarea' to 'editor'


--
Paul Asher - JR Developer and System Import Specialist
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
I thought I tried that but I will check it again right now =)
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
Ah ok that works now. I guess I didn't update both the create and update form. I am able to copy/paste when it's set to "editor" and it retains the carriage returns. Thanks!

Tags