Title: Rendering HTML code from a form field
Last modified: October 4, 2016

---

# Rendering HTML code from a form field

 *  Resolved [paulsvang](https://wordpress.org/support/users/paulsvang/)
 * (@paulsvang)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/rendering-html-code-from-a-form-field/)
 * Is it possible to render html code from a form (php variable). I’m not having
   any luck with this. I have created a form in a page and it displays correctly
   however when the variable loads the data to the textarea in the form, it shows
   straight html. How to I get it to render html?
 * I’ve also tried to just echo out the php variable outside of the form but I’m
   just getting html coding on the front end.
 * I then tried the print_r() but it’s the same results. Can someone point me in
   the right direction?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [SJW](https://wordpress.org/support/users/whitsey/)
 * (@whitsey)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/rendering-html-code-from-a-form-field/#post-8249898)
 * You can’t print HTML into a textarea.
    It only allows text so what you are seeing
   is default behaviour.
 * You might need to use [http://php.net/manual/en/function.html-entity-decode.php](http://php.net/manual/en/function.html-entity-decode.php)
 *  Thread Starter [paulsvang](https://wordpress.org/support/users/paulsvang/)
 * (@paulsvang)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/rendering-html-code-from-a-form-field/#post-8251319)
 * Thank you Shannon. I’ll take a look at that link.
 *  Thread Starter [paulsvang](https://wordpress.org/support/users/paulsvang/)
 * (@paulsvang)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/rendering-html-code-from-a-form-field/#post-8257180)
 * It worked once I run that code and put it outside the form. tx
    -  This reply was modified 9 years, 8 months ago by [paulsvang](https://wordpress.org/support/users/paulsvang/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Rendering HTML code from a form field’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [forms](https://wordpress.org/support/topic-tag/forms/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [rendering](https://wordpress.org/support/topic-tag/rendering/)
 * [textarea](https://wordpress.org/support/topic-tag/textarea/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [paulsvang](https://wordpress.org/support/users/paulsvang/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/rendering-html-code-from-a-form-field/#post-8257180)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
