Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Disable invisible Mandatory Drop Down List


Level 7

I can not submit my form because I can not disable a invisible Mandatory DDL.

I have try: form1.PageA.Sub_B.Table2.Row1.DDL.mandatory = "disabled"; but does not work!

I control this DDL from another DDL with a script on change:

switch (xfa.event.newText)


case "Kimel":

form1.PageA.Sub_B.Table2.Row1.DDL.mandatory = "disabled";

form1.PageA.Sub_B.Table2.Row1.DDL.presence ="invisible";



I am using this Function to validate my form:

function Ex1ValidFields()


   var bRtn = false;

   var aErrMsg = [];

   var rgEmpty = /^\s*$/;

if(( form1.PageA.Sub_B.Table2.Row1.DDL.rawValue == null) || rgEmpty.test(form1.PageA.Sub_B.Table2.Row1.DDL.rawValue))


if(aErrMsg.length == 0)

      bRtn = true;


app.alert("One required fields below have not been filled out:\n\n   * " + aErrMsg.join("\n   * ") ,4);;

return bRtn;


Thanks for your help

0 Replies