19.19 TEXT Function
This function generates text fields (or text input form items) from a SQL query.
Syntax
APEX_ITEM.TEXT(
    p_idx         IN    NUMBER,
    p_value       IN    VARCHAR2 DEFAULT NULL,
    p_size        IN    NUMBER DEFAULT NULL,
    p_maxlength   IN    NUMBER DEFAULT NULL,
    p_attributes  IN    VARCHAR2 DEFAULT NULL,
    p_item_id     IN    VARCHAR2 DEFAULT NULL,
    p_item_label  IN    VARCHAR2 DEFAULT NULL)
    RETURN VARCHAR2;Parameters
Table 19-19 TEXT Parameters
| Parameter | Description | 
|---|---|
| 
                                  
  | 
                              
                                  Number to identify the item you want to generate. The number determines which  See Also: "APEX_APPLICATION"  | 
                           
| 
                                  
  | 
                              
                                  Value of a text field item.  | 
                           
| 
                                  
  | 
                              
                                  Controls HTML tag attributes (such as disabled).  | 
                           
| 
                                  
  | 
                              
                                  Maximum number of characters that can be entered in the text box.  | 
                           
| 
                                  
  | 
                              
                                  Extra HTML parameters you want to add.  | 
                           
| 
                                  
  | 
                              
                                  HTML attribute ID for the   | 
                           
| 
                                  
  | 
                              
                                  Invisible label created for the item.  | 
                           
Example
The following sample query demonstrates how to generate one update field for each row. Note that the ename, sal, and comm columns use the APEX_ITEM.TEXT function to generate an HTML text field for each row. Also, notice that each item in the query is passed a unique p_idx parameter to ensure that each column is stored in its own array. 
                  
SELECT 
  empno, 
  APEX_ITEM.HIDDEN(1,empno)||
  APEX_ITEM.TEXT(2,ename) ename, 
  APEX_ITEM.TEXT(3,job) job, 
  mgr, 
  APEX_ITEM.DATE_POPUP(4,rownum,hiredate,'dd-mon-yyyy') hiredate,
  APEX_ITEM.TEXT(5,sal) sal, 
  APEX_ITEM.TEXT(6,comm) comm,
  deptno
FROM emp
ORDER BY 1Parent topic: APEX_ITEM