Wednesday, September 6, 2023

Highlight empty required items

Here is how to highlight form text items, witch Value Required attribute is set to "Yes" and do not have any value.
Create dynamic action to page zero

Name: Highlight required
Event: Change
Selection Type: jQuery Selector
jQuery Selector: input[type='text'][required]
Condition: -No Condition-
Action: Execute JavaScript code
Fire On Page Load: True

Code:

if(!$v(this.triggeringElement)){
 $(this.triggeringElement).css({"border-color":"red"});
}else{
 $(this.triggeringElement).css({"border-color":""});
}


Selection Type: None

Now run application and items having Value Required set to "Yes" background color is changed if item do not have any value.
You can find Value Required setting from item attributes.



No comments:

Post a Comment

How to install and configure Oracle Apex 24.1 with ORDS 22, Tomcat 9 and Jasper Report 7 on Oracle Linux 8.10

#########################Install Oracle  APEX 24.1################################ ----------------------------------------------------...