Skip to main content
This blog will show you how to implement read-only and disabled switch widgets in Oracle APEX.  Unlike other page items, the switch widget is more tricky because it transforms when it is read-only and has a built-in validation that can be frustrating to work with.


essay to do good conflict resolution topics essay source url quanto custa o viagra cialis click here que pasa si una mujer se toma una pastilla de viagra drugs to use with viagra essay template word mac are cover letters necessary for resume ingerasii generic cialis how to write a sad love poem gold feature presentation blue pill 031 source essays on beauty rediscovers the male body follow precio viagra farmacias similares business writing courses toronto source link enter site success in business essay good ways to start an essay about yourself planning to write an essay There are multiple ways to display a switch widget as read-only or disabled.  We will examine the main iterations below:

1.)  Read-Only Set to Always

    • Transforms from the default switch widget to text that reads “On” or “Off”
    • Not the most user-friendly
    • Not the most intuitive because the default values are “Y” and “N”
    • This will throw an error on page submit unless you change the page item settings for the switch widget

2.)  Dynamic Action – Disabled

    • The switch widget displays as normal, but it is grayed out
    • Disabled items cannot hold a value in session state
    • This will throw an error on page submit

The Best Solution – Dynamic Action JavaScript

  • The widget looks disabled, but still holds a value in session state
  • There are no errors on page submit
  • Create a Dynamic Action on Page Load and use this JavaScript:


Learn More

We do not take responsibility for any unintended or unwanted consequences in your instance of Oracle, Oracle APEX, or related products as a result of reading our blogs or following our guides. Though the information is fully tested and generally safe to use, our lawyers really have a thing against admitting potential wrongdoing. If it makes you feel any better, one time I convinced them that the reason The Matrix broke so many box office records was because it accurately portrayed how real-world hacking was done.  I then told them that it is no coincidence that hacking attacks have grown exponentially since it was released.