2

I'm looking for a way to create a form in SharePoint 2013 which will allow me to submit multiple items into a list (each line as an individual record). So, for example, i'd have a form with inputs for Item 1, Item 2, Item 3 etc. but when it inserts the data into the SharePoint list i'd like each one to be it's own record inserting into an overall field called Item.

I'd also like to be able to have some fields which would be universal for all items and would only be filled in once and not per every line item (e.g. Customer information, name, address etc.).

The end result would be that the customer fills out their information at the top, adds as many line items as needed and submits. On the back end the data would have the customer information for each record but each item would be it's own record.

Is there a good way to do this in SharePoint 2013? I was thinking maybe I could build a custom html form and insert the records via REST API, but not sure if there is an easier way to do this, or if this sort of thing could be done using a REST API POST.

I used to do this sort of thing using InfoPath but since that isn't going to be supported by MS going forward I'm trying to move away from it.

2 Answers 2

1

If you're not going to use InfoPath then you're definitely going to be looking at creating a custom form using HTML and some other custom logic to do the submission for you. The lowest barriers to entry will be JavaScript on the client, or C# in a provider hosted Add-in or server solution.

I strongly recommend you consider JavaScript (REST or the JavaScript Object Model) or C# (also REST or the Client Object Model) from a provider hosted add-in.

Once you make your decision you'll have a number of other choices to make. If you decide to go with JavaScript you can integrate a framework like Angular, Knockout, or React (among others) to render data retrieved using the REST or JSOM APIs. For submitting multiple items, I find the JSOM a bit easier to work with than the REST API, which can only submit batch network requests in the most recent versions of SharePoint Online (not in 2013).

Hopefully this helps a bit - the question is a rather broad one but this should give you some areas where you can start looking.

I would also suggest taking a look at the OfficeDev Patterns and Practices Github Repo for some examples using these techniques.

1
  • Thanks for the suggestions! I've been wanting to learn Angular for some time now so this may be a good time to dig into it. I'm limited to building this on the client side so won't be able to implement a server side solution.
    – Nate
    Jan 17, 2016 at 14:55
0

If you are using on-premise SharePoint version, writing a visual web part would be easier in terms of writing code. Otherwise, I would say REST API is the way to go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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