News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Register/Profile - Field type : Large Text ?

Started by FrenchFOFO, July 26, 2020, 10:54:36 AM

Previous topic - Next topic

FrenchFOFO

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  :)

Arantor

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.
Holder of controversial views, all of which my own.


FrenchFOFO

This is a citation, simply to make the field selectable !

Another way to do this?

Arantor

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)
Holder of controversial views, all of which my own.


Advertisement: