cancel
Showing results for 
Search instead for 
Did you mean: 

Two Buttons on the Interactive Form

Former Member
0 Kudos

Hi Gurus,

I need to have two buttons on the form which perform different actions So I need to identify the button clicked in the OnSubmit event.

I have two buttons on the form "Submit" and "BACK". So I added the two submit buttons on the form, both are working as OnSubmit event is getting triggered by both the buttons.

From some previous posts, I read that I've to add a attribute to context and set the attribute value in the form when the button is clicked. So added a field binding that to context attribute.But , When I write below code , the submit button does not work.

xfa.form.Page1.Subform.Buttonclicked.rawValue = "BACK";

Where Page1 is page , Subform is subform Buttonclicked is my attribute in context/field on the form for attribute

I tried adding this code before and after the submit events code that is,

ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");

Am I adding the code in correct place? Is the code correct to set the attribute/field value?

Can anybody help me resolving this issue?

Thanks in advance!

Regards,

Kuldeep Jadhav

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Are you sure its correct path to the ellement. Use the name + . rawValue exactly how it appears if you look in any event of the ellement. Probably something like data.Page1.....

Former Member
0 Kudos

I am not sure if I am addressing the element in correct manner...thats what I need help in....Can anybody help me in addressing the element correctly as well as the event of Submit button in which I should use this code....

Answers (2)

Answers (2)

OttoGold
Active Contributor
0 Kudos

Hello, do you like the answers? Have you resolved your problem using these? Maybe you can share your solution with us then and close the thread? Or there are any more thing which are not clear? regards Otto

chintan_virani
Active Contributor
0 Kudos

This issue has been discussed here before. Please go through my replies here --> .

Chintan