Hidden field component

Avatar

Avatar
Boost 1
Level 1
AshishSPanwar-a
Level 1

Like

1 like

Total Posts

18 posts

Correct reply

1 solution
Top badges earned
Boost 1
Validate 1
Affirm 1
View profile

Avatar
Boost 1
Level 1
AshishSPanwar-a
Level 1

Like

1 like

Total Posts

18 posts

Correct reply

1 solution
Top badges earned
Boost 1
Validate 1
Affirm 1
View profile
AshishSPanwar-a
Level 1

15-10-2015

Hi All,

 

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 

<form>

element does not have any action or method defined. A lot of this is being done via javascript.

 

I similarly have more data I would like to pass via hidden fields bit I'm stuck on the first step.

 

Thanks

Ashish

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Employee
deepak_k_
Employee

Likes

5 likes

Total Posts

84 posts

Correct reply

32 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile

Avatar
Boost 5
Employee
deepak_k_
Employee

Likes

5 likes

Total Posts

84 posts

Correct reply

32 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile
deepak_k_
Employee

15-10-2015

Hi,

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.

Deepak

Answers (0)