Default value and web

Probably a simple question for which I apologize in advance. I want to set a default value for a text field in a form to be used on the web. I can use the standard “Default Value” option for simple strings but if I try to use carriage returns (including with or without @NewLine) the text is truncated at the first CR. Any ideas?

Subject: Default value and web

A normal field generated for the web by Domino, becomes an html input tag. This is one line of text only. To get around this, you need to hide the field from web, and manually code a html textarea with a computed text inside. That should do it. You might need to replace any “&” with “&” in the computed text, or it might not work.

/Peter

Subject: RE: Default value and web

Multi-value fields are rendered as textareas, if they are set to separate new values with new lines. Should be the easiest way to create a textarea, although it will still require you to provide some HTML attribute for the desired number of rows and columns.

They will also accept linebreaks, either literally or using @NewLine as default values.

Subject: RE: Default value and web

I know this is how many people do it, but it does add other problems if what you want is really a single value field. You need to specify an input translation formula to put it back together again, and if you want extra line breaks in the field, that doesn’t always work.

/Peter

Subject: RE: Default value and web

Thanks for the help guys. However I want to use the same field in both the Notes Client and web. So the idea of a list box does not really work. I discovered that a rich text field works OK but that gives me new problems in the Notes Client in that I can’t update it until it’s saved – something else I need to do. Any other ideas?

Subject: RE: Default value and web

Who had suggested a list box? Am I missing something?

Subject: RE: Default value and web

Gary, you should read through the responses one more time. We haven’t even mentioned a listbox. We have neither talked about any RT fields. We have been talking about a HTML textarea field, and the different ways to create one.

/Peter

Subject: RE: Default value and web

Sorry for any confusion. I typed list box rather than ‘multi-value field’ as suggested. However, the problem is the same: I need to use the field for both web and notes Client and a multi-value field will give a functionality I don’t want in the client won’t it?

Subject: RE: Default value and web

Sorry for the delay…

Create a text field, and hide it from web.

Create a textarea with the same name and make it passthrough HTML. Hide it from Notes. Create a computed text inside the textarea tags, where you do @replacesubstring(fieldname; “&”; “&”)

This will work.

/Peter