Skip to content

How to get the value of textarea/stage element via jquery correctly? #13310

Closed Answered by brandonkelly
vnali asked this question in Q&A
Discussion options

You must be logged in to vote

This is more of a general JavaScript/HTML question. Craft doesn’t do anything special here. The <textarea> is just a <textarea>.

.text() is for getting the HTML-encoded textual value of an element, or setting a value that should become HTML-encoded.

To get the value of a textarea, you should use .val() instead (('#textareaField').val()).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by brandonkelly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants