I'm exploring AEM Forms on OSGI (AEM 6.0 SP2 + AEM Forms 6 SP2).During form submit action I need to pass some hidden values. I created a simple component that generates following markup.
<input type="hidden" name="username" value="admin" /> // value can keep changing
Clicking on submit action button does not submit the form. Firebug or Chrome console lists out lot os js error.
On closer inspection I found that unlike foundation forms component, here
I similarly have more data I would like to pass via hidden fields bit I'm stuck on the first step.
Did you not considered using AEM Forms field components which you can hide via visibility expression set to false? For those components, you can prefll value from XML and you would get the same value returned on submit.