locked
submit 2 infopath form webparts with one button RRS feed

  • Question

  • I have a master/detail data structure (a request which has several items in it) so I have created 2 lists to handle this.

    I am seeking a way to let my users input data into these lists.

    In this post clayton cobb has suggested to have a page with 2 infopath form webparts in it.

    How can I have ONE submit button which submits both of these forms simultaneously?

    Any helps are appreciated

    Thank you

    Saturday, September 12, 2015 2:25 PM

Answers

All replies

  • Hi,

    We can create a visual web part and customize a form to achieve your requirement.

    https://msdn.microsoft.com/en-us/library/office/ff597539%28v=office.14%29.aspx?f=255&MSPPError=-2147217396

    Or here is a similar thread for your reference:

    https://social.msdn.microsoft.com/Forums/office/en-US/cee7a64a-7290-47a2-bda6-118ca7a9ed19/how-to-submit-infopath-form-data-to-multiple-sharepoint-lists-at-one-time?forum=sharepointcustomizationlegacy

    Best Regards,

    Dennis


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Proposed as answer by Patrick_Liang Monday, September 21, 2015 2:54 AM
    • Marked as answer by Patrick_Liang Wednesday, September 30, 2015 9:39 AM
    Monday, September 14, 2015 7:39 AM
  • Thank you for your answer.

    Based on the bellow paragraph (which is an answer from this thread ) I guess there should be some way to do it without visual web parts. But I'm not sure:

    "

    I would be doing it with two forms from two lists (the child at least has to be a list), and I would use a custom page with InfoPath form web parts to show the master form in one form web part and the custom list form that allows multiple entries in the 2nd form web part.  I would connect the two so that the ID of my master would be passed as an input parameter to the child form in whatever field I'm using to associate child to parent (lookup field or simply a foreign key field).  There would be a submit for both, but that's not the end of the world.

    "

    Monday, September 21, 2015 4:50 PM
  • Hi,

    Using two form webparts in one page is OK, but we can't submit the two forms data to two custom lists in one button click.

    Per my knowledge, we have to customize it, I can't find a better way using the OOB feature.

    As a workaround, we can add a custom button in the page(contains the two form webparts), then use some jQuery and JavaScript Client Object Model to send the data to the custom lists.

    Best Regards,

    Dennis


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.


    • Edited by Dennis Guo Wednesday, September 23, 2015 2:24 AM
    • Proposed as answer by Patrick_Liang Friday, September 25, 2015 3:29 AM
    • Marked as answer by Patrick_Liang Wednesday, September 30, 2015 9:39 AM
    Wednesday, September 23, 2015 2:24 AM