This is how you create a TEXTAREA in Domino

I have banged my head against the wall about wanting a TEXTAREA for the web, but always had to do the multi-value text field with a NewLine separator and then give the field HTML attributes to size it (rows and columns).

This is THE solution and how wonderful it is, if I can just explain it properly. :slight_smile: This is for anybody who wants a TEXTAREA for single value text field…

Take this and put it as pass-thru HTML:

In this case, I have a plain text field called “ProbabilityJust” and it is hidden from the browser. This TEXTAREA is the input field for this field.

The value for ComputedValue is the name of the plain text field, in my case “ProbabilityJust”.

The rest is jibberish you may or may not need, but I’ll explain it anyway - and this works in both Firefox and IE.

I have a computed for display field on the form - “browserType” whose value is @BrowserInfo( “BrowserType” ). This enables me to code things to work in different browsers because we know that they don’t play nice together!

I have a css class to define how I want the TEXTAREA to look and then I have the onKeyPress event coded to not allow the user to enter a RETURN - I noticed it wrote a special character to the text field. (The onKeyPress is written to work in both Firefox and IE.) Then I have an onChange event that writes the value back to the hidden field, so it is always current and up to date.

It refreshes beautifully and maintains the value in the front-end and back-end when saved.

I hope this will help some of you out there as it has been a wonderful help to me to finally get rid of some multi-value fields I had just I could display them as TEXTAREA.

Sincerely,

Debbie

Subject: This is how you create a TEXTAREA in Domino

Hi Debbie,

When you say that your field ProbabilityJust is hidden from the browser, is it an input of type hidden (e.g. or is it actually not send as HTML to the browser?

If you don’t have ‘generate HTML for all fields’ ticked you can simply just hide your field from the web and enter

where is the value of the field.

Works a treat for me!

Gawd only knows why those bods at Lotus didn’t just put a flippin property for the field to be displayed as a text area. Supremenly short sighted if you ask me.

Keep up the good work. Good to see it’s not just me who struggles deploying domino onto the web… :slight_smile:

Subject: RE: This is how you create a TEXTAREA in Domino

Hi Adam,

Good question as this often matters, but I just have the good ol’ hide/when property set to “Hide from Web” for this particular scenario.

I do have some fields created with HTML and “hidden” like you put in your post - so that HTML was generated. It all depends on what I’m trying to do.

Debbie

Subject: RE: This is how you create a TEXTAREA in Domino

That code is so cool - thanks Debbie!