Reputation: 5
I have JS line
document.getElementById(element).required=true;
How do I make it work in Oracle APEX?
I have a form with select list that has values Yes/No. If a value is "Yes", 2 more text fields appear. I have done it by making dynamic action (when item is changed and gets specific value) but there was no option to set required values, so I tried to "Execute JS code".
But JS line above didn't work.
Upvotes: 0
Views: 10267
Reputation: 719
You must add two conditionals validations for those text fields.
Upvotes: 3
Reputation: 1336
When you make an item required it is always required when you submit the form. You'll have to resort to page validations to check if it has a value in specific cases.
Upvotes: -1