问题
I want to create a form using oracle apex 5.1 like the image below. But I do not know how to create it. Could anyone direct me achieve this?
回答1:
You can use APEX_ITEM.TEXT in your query:
select empno,
APEX_ITEM.TEXT(25,ename) ename,
job, mgr, hiredate from emp;
You have to click on column (ename) in Columns section of your report and set Escape special character to No. If you use Interactive report you can put HTML Expression for every column like:
<input type="text" value="#JOB#">
To show data from column in input just set value to be #NAME_OF_COLUMN#.
For empty input just add column in query:APEX_ITEM.TEXT(25,'') text_input
or if you prefer second aproach add empty column and set HTML expression.
select empno, ename,'' as text, job, mgr, hiredate from emp;
Here is APEX_ITEM.TEXT function from Oracle Apex doc.
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;
回答2:
Items
can be created in an HTML Region
to create a form. You will then need to create Processes
to perform the action(s) required when submitting the form.
The documentation explains it step by step : https://docs.oracle.com/cloud/latest/db121/HTMDB/app_forms004.htm#HTMDB30063
回答3:
Use the new Integrated Grid feature that replaced the "old" tabular form:
See documentation: https://docs.oracle.com/database/apex-5.1/HTMDB/about-making-grids-editable.htm#HTMDB-GUID-0A317D17-5B12-4F4A-B5C8-68807DB5A4C1
来源:https://stackoverflow.com/questions/43491263/oracle-apex-5-1-about-creating-an-empty-input-form-like-the-input-form-when-cre