Copy link to clipboard
Copied
I have a text area on a page and need to save to a database and then output
the information exactly as it appeared on the text area. How can I replace enter keys with?
How do i do this, could anyone send me the code as got to get this up. I don't understand, help!
Kindest Regards,
Copy link to clipboard
Copied
Hi,,
Please try this
<cfif isdefined("form.btnsubmit")>
<cfdump var="#form#">
<cfoutput>
#replace(form.comments,chr(13)& chr(10),"?","ALL")#
</cfoutput>
</cfif>
<form action="index.cfm" method="post">
<TEXTAREA Name="comments" rows="4" cols="20"></TEXTAREA>
<input type="submit" name="btnsubmit" value="Relace">
</form>
Copy link to clipboard
Copied
You sure about that question mark in your replace function? I was think a break tag myself.