I need to create list in SharePoint 2010 with the following requirements. When anybody will try to create new item it will have some kind of header and body. In header it will input for example name and in body will have 2 items(car and color). Also user need to have option add new car and automatically another body should start(car and color)(it is more less like the option in Infopaths form where user are adding new item). Do you have an idea how can I start this task?


2 Answers 2


I am pretty new to sharepoint but think you need to start with sharepoint designer if you have already created your list.

If the list and the body are set automatically you can either use the default options and remove the ability to edit them in from the new form or you can use a workflow to set them if you need to have different options available. Alternatively if you need them setting by the user then just leave them as is in the newform and ensure that the fields in the list are set correctly.

As for the adding of another car I think if you have a choice field you can set it to allow fill in choices which should do what you are asking for here.

  • The idea is to add New Item in this form(cars). Each item will have number of elements (for example colors and enginge). So first when user will click I want new item. First he will have static number of normal elements like your name and surname and them depend of his wish number of cars (add button - new car). I think I have to connect this with different list and connect somehow with lists but I dont know how to start.
    – Dariusz
    Mar 15, 2012 at 12:19
  • I agree that the place to start is SharePoint Designer (SPD). You can use SPD along with JQuery, ASP.NET, and the Client Object Model to build some very advanced interfaces. Here is a link to go with MrWhimppy's part of the answer. I will add an answer to help with how to give the user the option to create a new car from the primary new form. office.microsoft.com/en-us/sharepoint-designer-help/… Mar 16, 2012 at 12:19

For the second part of your question about how to allow the user to add a new Car from the first new form there are a couple of problems that you need to solve.

  1. Bring up a dialog showing the user the new form for the Cars list. Here is a JavaScript function you can use to do that.

    //Of course you will need to edit this to fit your needs //and the address of your list. function openNewCarDialog(){ var options = { url:'https://sp2010.com/site/Lists/Cars/NewForm.aspx', width: 700, height: 700, dialogReturnValueCallback: dialogCallback }; SP.UI.ModalDialog.showModalDialog(options); } function dialogCallback(dialogResult, returnValue){ //Run the code to refresh the select box }

  2. If a new item is added to the Cars list how do you refresh the current new form's "Car" selection box without refreshing the entire form? I would suggest that you use a combination of JQuery and the Client Object Model. Use the Client Object Model to query the cars list for any new items not in the current select box and then use the JQuery function append() to add the new items to the selection list.

    $('#long-guid-of-select').append('Name of Car');

  • This might also be useful to lokk at. sharepoint.stackexchange.com/questions/13498/… Mar 16, 2012 at 14:39
  • Thanks MrWhippy and Robert for help. I will start first to associate the Primary Key with the main list and then step by step add the funcionality. Have you ever tried some funcionality like this or you have seen someone that was sharing on the blog something like this?
    – Dariusz
    Mar 19, 2012 at 7:58

Your Answer

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

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