4

Say I have created a really simple custom list via Sharepoint Designer, and then created a custom NewForm.aspx called NewFormTest.aspx to go with it. Now I have to add a field to the custom list. I understand that a custom form does not get updated automatically when a new field is created in the underlying list (data source).

So,how in the world do I get that new field to show up in my custom form?

I know if I update the custom list and create a new NewFormTest form, that it would populate, but then I would have to go and reformat my whole list!

I can't see any way to just drag the field from "Current Data Source" in the "Data Source Details" panel. What good is that panel? I'm sure I am missing something. Here is what it looks like in my SPD:

enter image description here

I've read this thread, but didn't see what I was looking for.

4
  • Like BGM, I'm also missing "Insert as List Form Field" in the Context menu. Do you already have an answer on this issue?
    – user14818
    Feb 10, 2013 at 19:53
  • Give me a couple days to see what I did (I can't remember), as I will have to revisit my problem...
    – bgmCoder
    Feb 11, 2013 at 2:40
  • Same problem here. No options to "Insert as List Form Field". I've seen similar threads across the internet asking the same quesiton yet none have an answer as to how to get the one option we actually want to make Designer useful for editing forms - "Insert as List Form Field".
    – user18059
    Jul 4, 2013 at 10:50
  • The solutions given below all show to "copy and paste" an existing form field! That's not the right way, in my opinion. How do you create the form field?
    – bgmCoder
    Sep 10, 2014 at 17:11

6 Answers 6

3

Please follow the steps given below

  • Open the form you need to edit in SharePoint Designer ”split view”.
  • Place your cursor on and highlight the row of data below (or above) where you want to add the new field.
  • Right click on the highlighted row and select Insert – Row Above (or Row Below depending on your situation). A new empty row will be added to the form.

enter image description here

  • Highlight one of the existing field titles on your form and copy it into the first column in the new row you just created. Change the title to the title you would like to use for your new field.
  • Highlight your new field title and look in the code view and verify that all of the formatting tags were also copied. Often, you will need to copy the actual code for the title from the existing to the new title to ensure the look and feel stays the same.
  • Click in the second column of the new row.
  • Open the Data Source Library and open the List or Library that corresponds with the form you are modifying. Click the list or Library and select Show Data. The Data Source Details window will open and scroll to the field you would like to insert.
  • Select the field you want to insert right-click and select Insert as List Form Field.

enter image description here

  • Insert a Field into a SharePoint Designer List Form Field
  • The field will be added. Save your form and test in the browser.

Source: Internet

3
  • 1
    Okay, I have read pages like this, and I get stuck at Insert as List Form Field because it isn't in that context menu. I can "Insert as Text", as "Hyperlink", as XPath, as "Hyperlink to New Form" - and other things, just like in your picture, but never is there any "Insert as List Form Field".
    – bgmCoder
    Aug 14, 2012 at 20:19
  • Do you have any ideas?
    – bgmCoder
    Aug 21, 2012 at 18:59
  • I think this may have been for Sharepoint Designer 2007.
    – bgmCoder
    Sep 10, 2014 at 21:03
2

The easiest way to accomplish this is

  1. Copy and paste a field that has the same characteristics (i.e. multi-line, dropdown, radio button) into the spot for the new field.

  2. In the code it will assign it an out of order ID (id="FormField1"). If you click the arrow on the top right of the field, click on the dropdown (Data Field) and find the name of the new field added.

  3. Then go into the code and find the id="FormField1") area and change it to the number after the last field's id (id="ff48{$Pos}"). You can find the last field by clicking on the last field and seeing that it is ff48 in the code.
  4. Change the new field ID to id="ff49{$Pos}" in the code. You will also need to change the field reference in the same line of code 'u',concat('ff49',$Pos) to match the same number.

Save and you are complete.

1
  • >>and change it to the number after the last field's id (id="ff48{$Pos}"). Thank You much! We need to increment this numbner for new created fields. Stucked with this..
    – Gennady G
    May 31, 2019 at 11:09
2

The most simple way I have found to do this is from within Sharepoint Designer (2010 in my case) in the ribbon.

  1. Open the desired form
  2. Click on one of the existing form fields to get the ribbon in the correct context
  3. Your ribbon should have an "add/remove columns" - click it to open the dialog window select your column
  4. Add your column and move it up or down as desired - yes, it's that easy! enter image description here
2
  • I'm trying to use this appraoch for adding a new column/field to the form but "Add/Remove Columns" is always greyed out.Can someone help me,does this approach work?
    – George
    Mar 12, 2015 at 10:57
  • I tried this. It added new labels but there was no control to edit the column values. It also added a load of rubbish like FileLeafRef.Name, FileLeafRef.Suffix, File Type. So now I will work out how to roll it back :( Dec 12, 2016 at 11:30
2

After long last I found the answer.

Refresh the Data Source

The first thing that is necessary is to make sure your current editing session for that form has the most recent collection of fields. To this end, you will need to display the Data Source Details panel, which will display the docking panel with a list of fields.

enter image description here

Then you have to make sure the data is current, so you choose "Refresh data source" - you only need to do this if you have added or deleted fields in the list settings and they are not showing in the Data Source Details. Once you refresh the data, all the fields will display in the Data Source Details panel.

enter image description here

Insert a Sharepoint Control

In the ribbon in the "Insert" tab, you can choose to insert a Sharepoint control. You insert a sharepoint textbox if you want a simple "single line of text" data type. Here is the ribbon insert.

enter image description here

At the bottom of that same dropdown menu, you can also choose to "Show Toolbox", which I have done below and see the same options from the docking panel.

enter image description here

Link the Sharepoint Control to the Data Source

Now you have a text box (or whatever you want) suited for sharepoint, and you can now choose the field for the data source:

enter image description here

I confirm that I have added a field in this manner to a custom NewForm.aspx and that it does receive and retain data just like you would expect.

0

I didn't do any of that. I figured out that I had to the create the column in my list first and then opened up Customize Form (in the list). I was then able to drag the field to my form (fields that were now listed in the fields box). I must not be really understanding the issue above if it was that easy. :)

1
  • 1
    You are missing the point. The question is what to do after you have a customized form, not before.
    – bgmCoder
    Jan 27, 2016 at 23:10
-2

Another easy way is just to create a new form which will include all the columns and then find your new column in SP Designer mode and copy the code to your forms that were previously modified in SP Designer!

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.