This is a forum where members new and old can come to ask questions and get info and opinions. It is not a place to advertise your business or have other forms of advertising, whether it be in your posts or signature.

All links in the forum will not be indexed by Search Engines and any unapproved forms of advertising or spam will be dealt with accordingly, deleted, and that member's account banned.

Forums

Overview » Dreamweaver » Format text from form field to database
Reply

Format text from form field to database

Jeff Hansen
Member



Since: 10 Jul 2001
Posts: 43
Posted 05 Oct 2001 17:27:55

I need to figure out how to have my form capture the page breaks that are used when users are writing paragraphs in a FORM. Right now, everything that it entered is just one long paragraph, the <BR> are not captured and sent as part of the text to the database.

Some please let me know how to handle this problem!

Thanks,
Jeff


I need to figure out how to have my form capture the page breaks that are used when users are writing paragraphs in a FORM. Right now, everything that it entered is just one long paragraph, the <BR> are not captured and sent as part of the text to the database.

Some please let me know how to handle this problem!

Thanks,
Jeff


Owen Eastwick
lost Member



Since: 10 May 2001
Posts: 748
Replied 05 Oct 2001 18:03:57
Enter the text in a multi line text field and insert it into a memo field in the database.

When you want to display it, complete with line breaks.

Replace this:

<%= (YourRecordsetName.Fields.Item("FieldName".Value)%>

With this:

<%= Replace(YourRecordsetName.Fields.Item("FieldName".Value,VbCrLf,"<br>"%>

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo

Edited by - oeastwick on 10/05/2001 18:05:05
Ryan Grace
Locked
Member



Since: 03 Oct 2001
Posts: 12
Replied 05 Oct 2001 18:09:35
Can this also be done in Java? Looks like the code you provided was for ASP.

Thanks,

Ryan

Owen Eastwick
lost Member



Since: 10 May 2001
Posts: 748
Replied 05 Oct 2001 18:53:53
Provided there is an equivalent Java function for <b>Replace</b> then it shouldn't be a problem but I don't know the syntax.

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Shawn Stark
Member



Since: 04 Apr 2008
Posts: 1
Replied 04 Apr 2008 21:57:15
I am attempting to do the same thing with JSP..
When using

&lt;%= Replace(YourRecordsetName.Fields.Item("FieldName".Value,VbCrLf,"&lt;br&gt;"%&gt;

Dose this place a break after VbCrLf or where every break is supposed to be created based on the data entered in the form.

I will not be updating my DB via a result set. I will be useing prepared statements and my own dynamic array class for retaining data for display...

I need to find a solution for my TEXT field or VARCHAR field that holds multi-line text data. As far as I know you can only save a String of characters in this field and saving stuff like
&lt;font color="red"&gt;somedata&lt;/font&gt; will cause issues becuz of the "" QUOTES is there an excape key to use when inserting or updating DB

INSERT INTO
frackinTabl (myField) VALUES ('&lt;font color="red"&gt;somedata&lt;/font&gt;&lt;br/&gt;')
<font color=red>Notice ^ that QUOTES & TICKS r different</font id=red>

How do I extract line number from multi line form data... Is this data just a single string or are there delimiters... I am sure I can create a solution wrapping the text in the display. This dose not allow my users much Formating control..


Reply to this topic

Message
Reply
Follow us on Facebook Follow us on twitter Subscribe to the RSS feed
Activate your free membership today | Login | Currency