InfoPath–”Save and New” button

STOP USING INFOPATH

Do you want people to be able to quickly fill in a form on your site, over and over again?  One option for this has always been datasheet view, but sometimes you have a more complex form.  In this post, I’ll show how you can create a button that will save the current record and immediately go to a new blank form.

In this example, I’ll just use a simple announcements list.

C10f014

  1. Go to your announcements list. On the List tab, click the button Customize Form.
  2. Put your cursor at the bottom of the form where you want to put your buttons.  From the list of Controls in the ribbon, add two buttons to the form.
    C10f07
  3. On the Data tab, click the Submit Options button.  Click the Advanced button.
  4. Next to After submit, choose Open a new form.  Click OK.
    C10f08
  5. Double-click to select the first button, and in the ribbon, click Manage Rules.
  6. In the Rules pane on the right, click the New button and choose Action.
  7. In the Details for box, type Submit. Click the Add button and choose Submit Data. Select your data connection to submit to.  This example is a SharePoint list, so it automatically has the one called “Main Data Connection”.  Click OK.
    C10f09
  8. Click Add again, and choose Close the form.  Click OK.
  9. In the Properties tab of the ribbon, label this button as SAVE.
    C10f012
  10. Double-click to select the second button still labeled “Button”.  Find the Action drop-down box in the ribbon.  Change the action to Submit.
  11. Change the button label to say Save & New.
    C10f013
  12. Publish the form and close InfoPath.

Done!  Now, if you want to make it look pretty and professional, use picture buttons instead of those old gray ones.  I like to use PowerPoint to create buttons and make them PNG files.

ONE NEGATIVE to this solution:

If you’re using a SharePoint list form customized with InfoPath, you’ll still have the save button in the ribbon.  That Save button will do the “save and new” functionality, and there is not a way to change this without messing up this solution.  One option you have is to remove the ribbon altogether.  Click File and click the Form Options button.  On the Web Browser tab, uncheck the box next to Show InfoPath commands in Ribbon or toolbar.  Unfortunately, when you do this, there won’t be an edit button there on the form either, and the only way people can get to the edit screen will be to use the drop-down box on that item when in the list view, or use the ribbon when in list view.

15 comments

  • Sara Tenenbaum

    Hi Laura,

    On a “Collect Data from User” task is there a way to collect statuses without completing the task?

    Thanks,

    Sara

    p.s. Your baby is adorable!

  • Could you specify the save location for new documents.

    I sometimes have users who have to fill out multiple forms, yet I’d like each new form to automatically uploaded to a previously created document set.

    Thanks

  • Sara,
    No, there isn’t a way to do that. I recommend just not using the task actions if you want to be able to do something more custom like that. Just use the action called “create list item” to create the task, and the “send an email” action to notify the person about the task.

    Andrew,
    No, you can’t do that by doc set or folder, only by document library.

  • Hi Laura,
    Do you have any knowledge or practice in creating data validation in datasheet view, actually in my scenario, I have a document library where users copy paste bulk documents using explorer view and then copy metadata from excel file for which they use copy paste and it save their time in data entry, but i am having problem in creating some validations in datasheet view, Please if you can respond on this
    Regards
    Hassan

  • Sorry Hassan, but I’ve never tried that. I’m not surprised if it doesn’t work the way it does in forms, though.

  • I tried your solution on SP2013, but to a form library. I have a total of 3 buttons on the form. The 1st button is to submit the form once it has been created. The 2nd button was supposed to save the form to a 2nd library where a workflow would notify the approvers, and the 3rd button saved it to an archive. However, each new button I programmed as you have above overwrote the rules for the other buttons. Could it be that it won’t work for form libraries using a site form instead of a library form?

  • Laura,
    I have a main data connection and a secondary data connection. I want to have two buttons on the main source view, “Save” and “Save & Close”. On the view with the secondary connection, I want a “Save” button to submit just the secondary data to it’s connection.

    Is that possible? Easy?

    Thanks.
    Keith B

  • I have saved InfoPath Form in a Form Library & also saved field values in separate columns, now I have retrieved one record in InfoPath Form 2013. I’m trying to update “Status” columns value from “New” to “old” but unable to update that value.

    Instead of updating it adds new record in Form-library.

    I have tried to filter the record on button click, but not found any filter on button click.

    My InfoPath Form Fields are-

    Name : Control
    Status:

  • Shep_Guy (guy Shepperd)

    tweeted you about the issue, I have custom rules, that submit to a form library depending on what selection you choose in a dropdown.

    I use the rules and conditions setting in submit form. Works like a charm.

    I have three button,
    1. save/continue (just updates form)
    2. Close (saves and closes form)
    3. save/new – for them to fill out multiple forms and not have to go through the steps of opening a new one every time they save one.

    any way to do this via a rule on the on submit?
    or any other way?

    Twitter account
    @Shep_guy

    Thanks

    Guy Shepperd

  • Hi Guy, I’m not sure I understand your question. First of all, “save/continue” is the same as submitting, it just doesn’t close the form.
    You said that you already have 3 buttons. You already have rules on the 3 buttons.
    “Any way to do this via rule on submit” – what do you mean by “this”?
    By the way, I pretty much never use the default submit button in form library forms, just go into form options and turn off the whole toolbar or just at least the submit button. Maybe that’s what you’re asking? That way, they have to click one of your buttons and can’t use the default submit.

  • Shep_Guy (guy Shepperd)

    Laura.

    Yes, save/continue is the same as save form, and leave it open. the person i am designing this for, wanted that verbage. (they didn’t like my label of update form :P)

    i want to be able to fill out the first page (view) and then for it to close and open a new one, so there can be multiple creations of records in the library pretty quick.

    thank you for helping out, I am expanding my knowledge….not sure where MS is going with the deprecation of InfoPath. So any suggestions there would be greatly appreacited.

    https://onedrive.live.com/redir?resid=B8372F1BB433567C!5208&authkey=!AEJjWYVYECpZ4QM&ithint=folder%2cxsn

    I have posted a Onenote with Screen clips here and the xsn file i am currently using. if that helps any.

    thanks

    Guy

  • Hi Laura,

    How can I solve, if I want to add a repeating table with only some data (for example: only “Body” field or only “Expires” field) to this form?

    thanks

  • So if using custom buttons with rules, is there a way to refresh the form or restart the form? I have a lot of custom “submit” buttons that show/hide according to what the user has selected so I do not have just 1 button. I tried to just switch views and have a hyperlink to the SP page where the form is located but it opens in a new window.

  • hi. i have three views in my infopath forms which are (Main view , Approver view, Read View ) . I create submit as your following post. but i cant able to submit the new form, it showing validation error on another form. can anyone help me out of this.

    • Instead of making a field required all the time… whichever of your fields is giving the error, you’d either have to put it on all of your views, or create a validation rule on it so that it’s only required under a certain condition.

Leave a Reply