Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Changing a subform's presence based on drop down selection

Avatar

Level 1

for some reason I cannot get this subform to go visible on my form. I'm using formcalc. Here is my formula:

if (xfa.event.newText == "Round") then (form1.ProductWorksheet.ProductInformation.Product.Shape.ShapePics.Round.presence == "visible") elseif (xfa.event.newText <> "Round") then (form1.ProductWorksheet.ProductInformation.Product.Shape.ShapePics.Round.presence == "hidden") endif

I've put this formula on the "change" event on the drop down. My scripting language is set to formcalc as well. Please let me know if I'm missing something here. Thanks!

1 Reply

Avatar

Level 7

Maybe the problem is what you are referencing. The if statement could be something like if ($.formattedValue == "Round") ....

You could also just do an 'else' rather than an 'elseif' if you don't have any other options.

Also I find for drop-downs it works better putting the script in the exit event rather than the change event.