More than one submit button on form - InfoPath Dev
in

InfoPath Dev

More than one submit button on form

Last post 08-16-2005 12:06 PM by dpinkerton. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 08-10-2005 01:26 PM

    More than one submit button on form

    Can I not have more than one submit button on a form? I've added two and notice if I change the webservice submit function for one of them it changes for both.

    I would like to have more than one submit button to call different methods in my webservice for handling of the form. IE - Complete button will save and index form, Save button will save the form and route it to a workflow in our application. These are two distinct methods in my web service.

    I can see ways around this - possibly, but we are trying to minimize the custom code and scripting in our forms. Suggestions on the best ways to do this would be appreciated!


    Thanks!

    Donna
  • 08-10-2005 04:23 PM In reply to

    Re: More than one submit button on form

    Hi Donna,
    Sure, this is easy in the the Designer. Once you have added two "submit" data connections (Tools->Data Connections->Submit->...). Just add a button to your form and double click it to bring up properties. Click rules and add. Click Add an Action. Select Submit using a data connection and choose the submit you would like to use. Close the dialogs and preview your form.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 08-11-2005 08:25 AM In reply to

    Re: More than one submit button on form

    Patrick -

    Thanks for your response - this is exactly what I have done. I have two data connections for submit = SubmitForm and PendForm that call different functions in the same web service.

    i add the first button - select SubmitForm and it's fine, works great. However, once I add the second button, set it up as a submit calling pendForm data conenction, my first button now also points to PendForm instead of the SubmitForm.

    So while it seems you can have more than one submit button, you really cannot - they end up pointing to that same submit data connection all the time.

    This is my issue.

    Thanks!

    donna
  • 08-11-2005 10:43 AM In reply to

    Re: More than one submit button on form

    That's because you are using default Submit handler instead of Rules with multiple actions. I'm pretty busy today but will try to respond with more details later.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 08-11-2005 11:28 AM In reply to

    Re: More than one submit button on form

    Ok thanks, more details would be great! If i get a moment I will look into the rules in the meantime, and see if I can figure it out today also.

    Thanks!
  • 08-11-2005 04:39 PM In reply to

    Re: More than one submit button on form

    Hi Donna,
    For default submit, InfoPath enforces one data connection. To work around this, change the Action to "Rules and Custom Code" and add a rule with two or more actions:

    1. Double click on the button and change the dropdown from Submit to "Rules and Custom Code".
    2. Click Rules.
    3. Click Add.
    4. Click Add Action.
    5. Select "Submit using a data connection" from the Action dropdown.
    6. Choose the first data connection that you want to submit to, for example "SharePoint submit".
    7. Repeat step 4-6 for another submit data connection (for example "E-mail submit").
    8. Click OK 3 times.
    9. Preview form.
    10. Click on button
    11. InfoPath will sequentially submit to multiple data connections

    Good luck!

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 08-16-2005 12:06 PM In reply to

    Re: More than one submit button on form

    Excellent! Thanks for responding, I'm just now getting back to it, and you saved me some time. Worked liek a charm. Thanks again!

    :)

    donna
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.