This course explores the different types of forms available in Oracle APEX, how to modify them in Page Designer, how to create an editable interactive grid, and how to use master details forms.
Learning Objectives
- Learn how forms work in an APEX application and the different types of forms available
- Understand the different ways of creating forms and modifying them in Page Designer
- Understand the different ways of creating an editable interactive grid
- Learn about master detail forms and how to create a master detail form in your APEX application
Intended Audience
- Anyone who wants to enhance their knowledge of Oracle APEX
Prerequisites
We recommend that you take this course as part of our Oracle APEX: Foundations learning path.
Welcome to the Oracle APEX Foundations course. Today in this lesson on Creating and Using Forms, we will see how you can create and edit a form in APEX. Let's get started. In this lesson, you will learn how to create a form in your APEX application. Later, you will also learn to modify this form in the page designer. The slide shows the project details form which is created on the project's table using the Create Page wizard. A form basically enables users to update a single row in a database table. The wizard allows you to choose a table on which to build a form. The wizard creates the Create and Cancel buttons on the page. You can create a new row in the table by entering the details in the form and clicking the 'Create' button. The form inserts the data into the table and then you are redirected to the page that you specified while creating this form. If you click 'Cancel', you are returned to the page that you specified while creating the form. Now, let us see how to create a form in an APEX application.
Now, I already have a demo application built on the project-sample data. On your application homepage, click 'Create Page' and select 'Form'. Under Page Definition, enter a name then select an option for page mode. You can either choose normal or Modal Dialog. A model dialog is an overlay window positioned within the viewport which remains active and focused until the end user dismisses or closes it. The underlying page is grayed out and the end user is prevented from interacting with the rest of the page until the dialog is closed. Note that you cannot run dialog pages directly from the Page Designer. You can review such a page by running a page that launches the dialog. In this example, we will choose the default normal. In the Data Source dialog, select the data source for the form. You can choose either a local or an external data source. The options are Local Database. The data is sourced from a local database. REST Enable SQL Service.
The data is sourced from a remote database where the connection is defined using a REST enabled SQL. Create or maintain REST enabled SQL references. Navigate to Shared Components and select 'REST Enabled SQL'. And lastly, the REST Data Source. Data is sourced from a RESTful web service defined using the REST Data Sources. To create or maintain REST Data Source, navigate to shared components and select 'REST Data Sources'. In this example, we choose Local Database. And we select a table or a view name. Here I choose projects. Expand navigation and disable both breadcrumb and navigation since we do not want to add this form in the breadcrumb or the navigation bar. Click 'Next'. You generally specify a primary key for a table. A primary key can either be a single column or a combination of two or more columns in a table. The Create Form wizard in APEX allows you to specify a maximum of two columns for a primary key.
In this example, we accept the default under branch pages, for branch here to submit. Select a page to branch to after the page processing is complete. Here I select Page 5, which is an interactive report that we have already built using the projects table. Now, select a page that you should be redirected to if you click the 'Cancel' button on the form. I select the same interactive report that is already built. Click 'Create Page'. Let us now run this Form Page. Now when working with forms, you might want to quickly change the format of a page item or rename a label. When you run a page, modifying objects is easy with using Quick Edit. Use the Quick Edit control in the Runtime Developer toolbar and select a desired component to instantly access that component in the Page Designer.
For example, consider that you want to update the status page item in the form dialog. In the Developer toolbar, click 'Quick Edit'. When you click on 'Quick Edit', it changes the cursor to a + symbol. Moving this + symbol over the page, highlights individual components such as regions, buttons, or items. When the page component you want to edit is highlighted, click that component and APEX will automatically open the page in the Page Designer with the same component preselected. This makes it easy for you to edit the properties in the Property Editor and quickly make the desired changes. Now, click on the 'Status' field. We are now navigated to the Page Designer. Notice that P19_STATUS item is preselected. Now the status item is a text field in the form. We want to change it to a select list type of item.
An item is a part of a HTML form. This item can be a text field, text area, password, select list, checkbox and so on. In the Property Editor, for type, choose 'Select List'. We immediately see an error which has been highlighted. This indicates that we need to enter the list of values that will be populated for the Select List. For the List of Values, Type, select 'SQL Query'. Enter the SQL Query. Click 'Save'. Let us run the page again. Here, you can see that the status item in the form is converted to a select list. To summarize, in this lesson, you learned how to create a form in your APEX application. Further on, you learned how to edit this form in your application. I hope you learned something useful. Thank you for watching.

Oracle University, the learning and training arm of Oracle, is a leader in cloud education, providing modern digital training, certification, and learning solutions across Oracle’s entire product portfolio that enable our customers to master their Oracle Cloud solutions and maximize their investments. Over 2 million certified professionals worldwide have placed their trust Oracle University to reach their learning goals. Learn about Oracle University.