Search code examples
oracle-apexoracle-apex-5

Is a disabled item consider as NULL in APEX 5.1?


I'm creating a form to inform that an employee has worked overtime. I'm using the APP Builder in APEX 5.1.

The form has 6 fields: Employee id, Employee name, Employee work area, Start time, End time, and Description (all fields being required). Employee name and Employee work area are disabled fields that are autocompleted when the Employee id is typed.

The problem is that when I try to submit the page (and the values would be stored in a Table in the SQL Workshop) it throws me an error saying that Employee name cannot store null values, but the Employee name and Employee work area fields are not empty.

I want to keep both fields disabled because I don't want typo errors in the table (for example: an employee writes his/her name as "NAME", but later he/she writes it as "Name", and the table would consider both inputs as different).

How can I fix this?


Solution

  • Instead of using disabled you can also use the HTML attribute readonly, the difference is that it will submit the value. Add it to the "Custom Attributes" property of your page items.

    Regards Patrick