Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: FrenchFOFO on July 26, 2020, 10:54:36 AM

Title: Register/Profile - Field type : Large Text ?
Post by: FrenchFOFO on July 26, 2020, 10:54:36 AM
Hi,

I add a new element to the registration with input settings Field type : Large Text (textarea) in admin page.

So that it also displays it in the profile page as a textarea, i add <textarea readonly>{INPUT}</textarea> in Show Enclosed Within Text (Optional):

Works perfectly, but in the profile page it shows all the line breaks <br /> in the textarea !

Is this a bug ?

How to solve this problem ?

Thanks  :)
Title: Re: Register/Profile - Field type : Large Text ?
Post by: Arantor on July 27, 2020, 12:02:52 PM
Um, why are you adding <textarea> tags in the display? The display option is for adding markup when displayed but textarea is for editing, not display.
Title: Re: Register/Profile - Field type : Large Text ?
Post by: FrenchFOFO on August 01, 2020, 08:23:30 AM
This is a citation, simply to make the field selectable !

Another way to do this?
Title: Re: Register/Profile - Field type : Large Text ?
Post by: Arantor on August 01, 2020, 08:34:21 AM
So the code you're trying to write is what gets wrapped around it when displayed, you shouldn't be using <textarea> for that.

Thing is, I don't know of *any* browser that can't select text even just on the page generally, it doesn't have to be in a textarea to make that work. Even mobile browsers can copy/paste text.

If you're looking for a way to make the text *easily* selectable, that's a different story and you still want different markup, but copy/paste to clipboard as a convenient function is complicated because it's not well supported by browsers (and until recently the only way to do it was with Flash)