Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Best way to implement dynamically required fields

Haytham-aNov 1 2024

APEX 2024.05.31

I have this Modal page which has a set of different fields (text, dropdown etc). I implemented a logic to show/hide field based on the previous field's input/selection. When the user click ‘submit’, a DA gets triggered and it calls PL/SQL block.

I made some of the fields which are mandatory to appear as ‘required floating’. But this is just an appearance and it does not enforce any validation on submission. I know there is the option under ‘Valication → Value Required’. But if I enable this, it will apply at all times, even if that field is hidden (not needed for particular flow).

What I want to achieve is two fold:

  1. Stop submission if required value is not entered (fields can change depending on the input: I have 4 different input flows)
  2. Show error message AND highlight the mandatory fields which are not filled.

I suppose 1 can be achieved through DA (if else etc)?

Any advice is appreciated.

Comments
Post Details
Added on Nov 1 2024
4 comments
1,275 views