Manage Learn to apply best practices and optimize your operations.

Multi-line text fields on the web

Quite often there's a need for multi-line text fields in native Notes.

Quite often there's a need for multi-line text fields in native Notes. These fields not only don't work in a browser they can cause data loss if they are browser editable even if no change to that field is made while the rest of the document is being edited on the browser.

The problem is a result of a Notes deficiency: Notes "assumes" that if you define a field as "text" and editable you must mean the HTML "<input>" field which, quite unfortunately, ALWAYS truncates the data at the first carriage return, even if that return was put there in native Notes and even if there are more lines of text to follow.

Think about what could happen: you crete and/or edit a document in native Notes. A text field that ALWAYS allows the use of a carriage return to start a new line in the text field contains a few paragraphs of text you really want to be text and not rich text. Then a user opens the document from a browser and the browser version of the document allows editing of the same field; upon save of the document that text field will only contain the data up to the first carriage return. Yes, you've lost the subsequent paragraphs without necessarily having edited that field.

You really wanted that field to be defined as an HTML "<textarea>" but Notes Designer does not allow you to stipulate an editable text field as an HTML <textarea>. Apparently, the Notes development team doesn't consider data loss to be a high severity bug. It would be great to have a little switch that allowed the notes programmer to choose between HTML <input> and <textarea>, but I digress .....

There is a roundabout way of accomplishing the same task with the use of hide formulae and Pass-thru HTML on the Notes form. You can define the editable text field as a <textarea> with a couple of tricks.

Let's say you're defining an editable text field called "TextDescription".

1.) create the text editable field "TextDescription"
Hide formula: @IsDocBeingEdited & @ClientType = "Web"

2.) next line, create a Computed-for-display field "TextDescriptionHTML"
a.) Hide from Notes & Reading
b.) Value: "[<TEXTAREA NAME="TextDescription" ROWS=4 COLS=54
WRAP=VIRTUAL>" + TextDescription + "</TEXTAREA>]"
c.) Set as Passthru HTML

The trick is to make sure the HTML <textarea> is named the same as the Notes field AND to make sure the Notes field is hidden from the Web when in edit mode.

Now, if I could only get the Domino server to render the same font sizes I use for my Notes forms without redoing the whole form in HTML.

Dig Deeper on Domino Resources

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close