4
votes

I'm new to coldfusion.

I have page called test1.cfm

<form action = "test2.cfm" method = "post">
    Type your name and hit submit:<br>
   <input type = "Text" name = "txt1">
   <input type = "Submit" name = "" value = "submit">
</form>

And test2.cfm

<cfoutput>
    success
    #form.txt1#
    <a href="test1.cfm">back</a>
</cfoutput>

Now I want to know if we can encode the displaying of text value in test2.cfm page. For eg. if we type <br> in the textbox, test2 page will render it as html, and I want to stop rending and it should display as text.

Thanks

2

2 Answers

10
votes

It's HTMLEditFormat(), not code.

7
votes

Use #htmlCodeFormat(form.txt1)#