3

I want to just hide the ribbon and place two buttons in the form-

One for "Submit" (we can simply apply Action Rule to achieve this) and second for "Saving" the form.

I cannot use Managed code here. Is there any way I can achieve this?

Update I can make use of C# code in InfoPath

  • 1
    I think some of the answers below assume that you're trying to submit information from your InfoPath to a list. If you're only wanting to save a form to InfoPath Form Library without creating duplicates when the form is re-saved, there should be a setting when you publish the form that asks how to want to save duplicates - to overwrite or to make a new form. Unfortunately, I don't currently have access to an environment to test and give you more details. – Erin L Oct 13 '15 at 18:32
  • @ErinL Can you please post your solution? – Kamalpreet Oct 19 '15 at 2:58
2

You could replicate this functionality using a field within the form:

Some field: SubmitBool.

once the form has reached a state that a submission would be appropriate set the SubmitBool value to true, and have rules change behavior once the value has changed.

You could also do something along the lines of having a form status field,

ie: Status = Open/Draft and change upon submit.

You can hide buttons to submit based on the value of that field.

Another thing to check is that you are using the same value for the file name upon submit. If you are appending a date to the file name and set it at form load without checking if it has already been set, it will save the form as a new file.

  • 1
    I've always found that this is the best way to do it. Like you said, you can hide/show different buttons based on the status field, or even show different views of the form. You can also promote that field to SharePoint and use it in workflows which is really useful. – Steven Mulkerrins Oct 14 '15 at 15:26
0

You can create clone of that list and on Save you can store the data in that list along with current user info and on submit you can delete the data from clone list for that user and submit to the original list.

Note: make sure to load the data on load from clone list for that user if you haven't submitted the form. on Save check if there is any value for that user if it is then update that record.

  • Can you post a bit more descriptive answer please? Like how to clone? How to handle save and submit? What should be the first operation that user should perform.. Save or Submit?? I prefer only single button. – Kamalpreet Oct 13 '15 at 15:50
  • @Kamalpreet if you want a single button then you can use submit it will save your form as well as data if you are saving data in your list programmatically or submit rule whatever you are using. – Sharique Ansari Oct 14 '15 at 13:38
  • and from that list you can access that form........ – Sharique Ansari Oct 14 '15 at 13:38
0

I have a submit and save button on my form and this is how I did it. So I have one form and on the bottom I have two buttons " Submit" and " Save ". I disabled the top Submit, save and save as button on my form. On my SharePoint site I made two document Libraries, one called Submitted Forms ( it initiates a workflow for me for approvals) and one called Saved Forms ( no workflow initiates they are simply stored.) The way I did this is:

  1. Click on the Submit Button in Infopath on the top menu go to Properties and make sure the Label and Action are logged as SUBMIT.
  2. Then, click on Submit Actions on the top menu and make sure " Perform custom action using Rules is clicked." Then press ok. 3.On the right side of the screeen Rules is automaticlly opened make a new ACTION RULE and make the " Submit using a data connection to the Library" where you want submitted forms and whatever procedure you want there"
  3. Click on the SAVE button and also make a new Action Rule by "adding a Data Connection to the Saved forms document library in SharePoint," where you can either mark you want to overwrite documents with the following prompts OR I have versioning enabled on my SharePoint list where I just see the same file, what version number it is and can go back and look at each one.
  4. Then add under another action under this rule " Close this form: No Prompt"

**** To hide the ribbon on InfoPath/SharePoint you go to** 1. File 2. Form Options 3. on the left hand " Web Broswer should be highlighted " 4. Simply uncheck SUBMIT, SAVE, SAVE AS etc.

  • Isn't it possible to achieve using single Document Library? – Kamalpreet Oct 18 '15 at 11:26
  • It is only if you do not have a workflow associated with one document library for instance with my completed forms I have a workflow so if I put the saved ones into that library it makes a workflow where I do not want it to . – VKay Oct 19 '15 at 0:59
0

To allow a form to be overwritten/changed, set up a data connection to your InfoPath Form Library, with the "Allow overwrite if file exists" box checked. Then add a rule to your submit or save button. (If you need to give the users a way to indicate when their form is finalized, you could add a "flag" field to the library that indicates whether the item is saved or submitted. Then you'd add both a submit and a saved button, and the buttons would set the flag field before submitting the form through the data connection.)

Data Connection

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.