Two submit buttons attached to two main submit

  • Thread starter Daniel Infopath
  • Start date
D

Daniel Infopath

i want to have two submit buttons in the form.

First one attached to main submit 1.

The second one attached to main submit 2.

When i saved the form and retrieve it, both buttons are attached to main
submit 2.

What steps i am missing? Please help.
 
B

benoitc

I'm pretty sure you're only allowed one "submit" action per form, even
if you have more than one button. If you set them both as
action=submit, they will both be set to the most recent data
connection you've defined as submit. This is why when you checked
your form again, they were both attached to "Main Submit 2", since
that was the last one that was specified.

What you can do is have the button action be "rules and custom code",
and then use the data connection from script, like this:

XDocument.DataObjects["MyDataConnection"].Query();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top