Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to get adaptive form submit button name in post.POST.jsp

Avatar

Avatar
Validate 10
Level 3
srikanthp689160
Level 3

Likes

20 likes

Total Posts

95 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
srikanthp689160
Level 3

Likes

20 likes

Total Posts

95 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
srikanthp689160
Level 3

09-04-2018

Hi,

Is there a way to get submit button's Element Name value in custom submit actions' post.POST.jsp on an AEM adaptive form?

The usecase is one adaptive form contains two submit buttons with different Element names and in post.POST.jsp the business logic varies for each submit button.

I tried resource object in post.POST.jsp but that gives adaptive form object.

Thanks & Regards,

Srikanth Pogula.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
Level 5
James_R_Green
Level 5

Likes

47 likes

Total Posts

191 posts

Correct Reply

47 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 5
James_R_Green
Level 5

Likes

47 likes

Total Posts

191 posts

Correct Reply

47 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
James_R_Green
Level 5

10-04-2018

How about adding rules to the buttons to set a hidden form field to say "submit1" and "submit2" and checking these in your code after submit?

Answers (4)

Answers (4)

Avatar

Avatar
Validate 1
Level 1
hari_purushotha
Level 1

Likes

0 likes

Total Posts

16 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
hari_purushotha
Level 1

Likes

0 likes

Total Posts

16 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
hari_purushotha
Level 1

23-05-2018

Hi Srikanth,

I am working on the same scenario.can you please share the code piece in post.POST.jsp and how to configure the hidden field for submit button.

Avatar

Avatar
Validate 10
Level 3
srikanthp689160
Level 3

Likes

20 likes

Total Posts

95 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
srikanthp689160
Level 3

Likes

20 likes

Total Posts

95 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
srikanthp689160
Level 3

10-04-2018

Thanks DarrenBiz and James,

The above approach worked, thanks much for your help.

Avatar

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

67 likes

Total Posts

205 posts

Correct Reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

67 likes

Total Posts

205 posts

Correct Reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
DarrenBiz
Level 5

10-04-2018

You could try leaving the field normally visible, then hiding it on initialise. That way it should always show in the component side panel in the Rule Editor.

Avatar

Avatar
Validate 10
Level 3
srikanthp689160
Level 3

Likes

20 likes

Total Posts

95 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
srikanthp689160
Level 3

Likes

20 likes

Total Posts

95 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
srikanthp689160
Level 3

10-04-2018

Hi James,

Thanks for the quick reply.

I tried the above approach but unable to see hidden fields listed while during Set Value of function.

Also am working AEM 6.2 SP1 CFP3 where am unable to find hidden form field component in side panel, any idea if there is any component which is readily available? or should the input hidden field be added at adaptive form template script?

Thanks & Regards,

Srikanth Pogula.