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...
You could use some jQuery like this to mimic the look-and-feel of a disabled item, while keeping the Submit in tact:

Code

Page

Identification
Page ID
Name

Item

Identification
Sequence
Name
Display As
User Interface
Region
Label
List Of Values
Display Extra Values
Display Null Value
List of values definition
Advanced
Warn on Unsaved Changes

Item

Identification
Sequence
Name
Display As
User Interface
Region
Label
List Of Values
Display Extra Values
Display Null Value
List of values definition
Advanced
Warn on Unsaved Changes

Dynamic Action

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