Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping line breaks in a form field 1

Status
Not open for further replies.

mtarby

Programmer
Feb 19, 2003
89
US
I'm trying to write a form that will send an html email with the responses using ASPEmail. Everything looks great except multi-line form fields. If someone enters a line break in the field, how can I pass that through.

For instance, if I have this field on my form:
Department(s) job charged to<BR>
<textarea name="charge_to" cols="75" rows="2" wrap="VIRTUAL"></textarea>

I have this in my script that processes the form, which puts all the data on one line:

strBody = strBody & "<b>Department(s) Job Charged To: </b> " & strChargeTo & "<BR>" & vbCrLf

Suggestions?

Thanks in advance!

Michelle
 
just replace the vbCrLf
with a <br> or <p>

replace(string, vbCrLf, "<BR>")




Bastien

Cat, the other other white meat
 
Thanks - that's exactly what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top