InfoPath Form Implementation by Web Services

InfoPath form is the SharePoint feature provided to create form without any HTML and CSS code. InfoPath forms are created by the InfoPath Designer tool. There are many form templates available to implement the InfoPath form like implementation by SharePoint list, SharePoint form library, Database, Web services, XML or Schema and many more. Here we are demonstrating that how to implement InfoPath form by the Web Services using InfoPath Designer 2013 and SharePoint 2013. In this form, we are inserting and updating data of form into the SQL database.

To create InfoPath form by Web Service, first, you need to implement web services to insert and update data and deploy that web services on IIS (Internet Information Services) manager. After deploying web services you need to follow the below steps for the form implementation:

1. Open the InfoPath Designer 2013 and select the Web Service form template and then click on Design Form.

InfoPath

2. When you select the Design form, a Data Connection Wizard will appear. In Data Connection Wizard, select the Submit data option and click on Next.

InfoPathSubmit

3. Write the path of web service in Web Service Text box same as the given format in the example and click on Next.

InfoPathWebURL

4. Select the web service which you have implemented to insert/update the data. Here we are using the web method InsertData to insert the data in SQL table. Now click on Next button to go to the next wizard window.

InfoPathWebMethod

5. If you want then update the name of data connection or can keep it same and click on Finish to setup connection.

InfoPathConnName

6. You will get all the fields connected to InfoPath form as myFields. Now add the fields to the form by drag and drop.

FieldConnection

By clicking on the Manage Data Connections link, a Data Connections wizard will appear. Bind the all fields by this Data Connection wizard to insert data in SQL table. In this wizard, you will get the Main Submit connection string which you created above. Select this connection and modify it. When you will modify it, another Data Connection Wizard will appear where you can see the path of Web service which you have added earlier. Click on Next and select the operation of Insert. In the next window, you will get all fields of web service, bind these fields, click on Next and then click on Finish the connection. Now publish the form to a library and run the form. After publishing the form, you can create the form from a newly created Form library and also perform the update operation on form from the same library.

Related Posts

Leave a comment