Text Areas

Use

In an HTML text area, users can create their own multiline text:

The input field can be locked against entry.

The text within a text area cannot be formatted.

Text areas can be used in Web forms, even with SAP Web AS 6.10 (via Support Package). See Note 434644.

Integration

To integrate HTML text areas in a Web form, mark a whole text node as Text area on the Web Attributes tab page (see: Using Text Areas). The generated HTML code is then as follows:

<text area NAME="(name of text node)"
          ROWS="(value from input field Column/Width)"
          COLS="(value from input field Lines/Height)"
          DISABLED <!-- Only if Display is selected--> >
<!-- content of text node -->
</text area>

Unfortunately, the system cannot check whether the text area has enough room in the window in which the text node is output.

Features

Smart Forms can generate a text area from text elements, text modules, and include texts. Smart Forms generates HTML input fields before and after the <TEXTAREA> tag. These fields have the type HIDDEN and the attributes of the Smart Form text are stored in them. These attributes are transferred with Submit:

Transferred information when a text area is used in a Web form

Name of the hidden input field

Value of input field according to text type,
if there is an attribute for the text type

Text element

Text module

Include text

xsf_meta

TEXT_ELEMENT

TEXT_MODULE

TEXT_INCLUDE

name

 

Name of the text module

Text name

object

   

Text object

id

   

Text ID

lang

Language, for example, DE

Language, for example, DE

Language, for example, DE

client

   

Client

Node name (only if text area content can be changed)

(Content of text area)

(Content of text area)

(Content of text area)

xsf_meta

/TEXT_ELEMENT

/TEXT_MODULE

/TEXT_INCLUDE

The fields are transferred in the sequence specified here (from top to bottom). For information on accessing the transferred name/value pairs in BSP applications, see Evaluating Form Input.

Returning Changed Text to the Smart Form

In many applications, you want to integrate the text that was changed in a Web form back into a Smart Form in order to print the form with the changed text. This is no problem in the case of simple and group input types because you can pass the changed values to the form from the form interface.

You cannot, however, transfer a text node to the form interface or process or create a text element or text module from a Smart Forms API. If you want to use text created using a text area in your Smart Forms template, you have to work with Include texts. You can modify an include text using the function module SAVE_TEXT so that the updated text is read when the text of the form is read again.

For more information, see the function module documentation for SAVE_TEXT in the Function Builder (SE37). SAPscript buffers standard texts (text object TEXT). Changes to these text objects are therefore not visible before you have exited the current transaction. If you want to display changes made with SAVE_TEXT directly, you have to use a different application-specific text object.