Skip to Main Content

LOVs

Info

When showing Select Lists that only contain 1 item it is nicer to shown these as Disabled, so the user can see at once that there is no option to choose from.
Normally you can do this manually for each Select List item. But for items that have Select List queries that are dynamic, you will need a dynamic solution.

The Dynamic Action in this example sets all Select Lists on the page to Disabled (during Page Load) if they only contain 1 item, and adds some CSS.
You could also include this in the "Execute when Page Loads" Javascript of the page itself, instead of using a Dynamic Action.

Note: items that have the "disabled" attribute set, will not have their session state set when submitting the page! So you may need some hidden items, or a similar solution...

Code

Page

Name
Page ID
Name

Item

Identification
Sequence
Name
Display As
User Interface
Region
List Of Values
Display Extra Values
Display Null Value
List of values definition

Item

Identification
Sequence
Name
Display As
User Interface
Region
List Of Values
Display Extra Values
Display Null Value
List of values definition

Dynamic Action

Identification
Name
Execution Options
Sequence
When
Event
Advanced
Event Scope
True Action
Identification
Action
Settings
Code
Execution Options
Sequence
Fire On Initialization