I want to use InfoPath form(s) to insert and edit a list item, because you can do allot more with infopath in an easyer way.

I want to change the value of a field after another field has been changed, and this seems impossible with a custom aspx form.

I also want to use attachments wich also doesn't work if you customize the aspx form, wich has te effect that you cannot use javascript to change values of a field(because you simply cannot add javascript to a standard list form).

My plan is to make two custom pages that host InfoPath forms wich will handle the inserting and editing a list item.

I know how to make a page that hosts an infopath form (http://msdn2.microsoft.com/en-us/library/aa701078.aspx)

and how to submit to a sharepoint list(http://blogs.msdn.com/infopath/archive/2007/03/26/submitting-to-a-sharepoint-list.aspx)

so in theory i could make the insert form(don't know how to handle attachment yet), but for the edit form i don't know how to get the list item i want to edit. i am thinking of getting the list item ID from the URL,put it in the Infopath form some way and then fire a webservice request to get the list item i want to edit.

after this i still need to look at the attachment problem.

Does anyone have experience with this, then please share your knowledge.

Thank you

Re: SharePoint - InfoPath Forms Services Use InfoPath form to insert/edit a List Item

David Dean

Have you considered using SharePoint Designer to customize your edit page You can use a Data View or Data Form web part to perform the customization you want to achieve, including use of JavaScript.

Another possibility is to add a Content Viewer web part to the edit page and put a <script> block in it that contains JavaScript code to hook the event handlers for the edit fields.

Either of these approaches is probably easier than trying to integrate an InfoPath form in a manner that looks and feels the same as the built-in edit page.