$().SPServices.SPLookupAddNew() and custom form

Mar 25, 2012 at 10:19 PM

I've added a custom new item form to my list.  This is on 2010 with the modals turned off.  The new custom form has been set to the default.  I did that through SPD.  I'm trying to add this bit of code to the form for a little extra flair:

		lookupColumn: "SP Contact",
		promptText: "Add new {0} "

All works as expected except that it's redirecting the user to the OOTB NewForm and not the default.  I'm pretty sure you determine the default form via web service, but would like to know if you have seen this and have any advice as to what is going on.


jQuery ~ 1.4.4

SPServices ~ 0.6.1




Mar 26, 2012 at 3:03 AM

Do you mean the custom Newform is on the lookup list or the "host" list? In other words, the list where you have added the script above or where it sends you?

I actually rely on SharePoint to send you to the right form; it does an automatic redirect to whatever form is set.


Mar 26, 2012 at 1:13 PM

The custom NewForm is on the lookup list.  I'm going to keep fiddling with it as it seems like something is busticated for some reason.

Mar 26, 2012 at 3:01 PM

Hi Matt... Not sure this will help... but here goes...

Looks like the SPLookupAddNew() utility "Uses GetFormCollection to get the URL for the NewItem form for the Lookup column's list"... I'm assuming that whatever you did on SPD is not being reflected in the response from GetFormCollection output. Can you check (if using FF, you can view the response on the console when Mark's code get's it). 

In the past, I have had trouble with changing the default forms for certain lists via SPD (2007)... Specifically, when you right click the list name and select Properties in SPD, and go under the "Supporting Files" tab, I had to change the default (in my case the Display and Edit forms) for both Content Type of Folder and Item until it got it right... but even by saying "right" is not really what I would have expected... Some of the List's default links will still point to the default DispForm.aspx, but SP seems to automatically redirect to the custom form, so I really don't get the OOB form.

Hope this helps.


Mar 26, 2012 at 5:43 PM

I'm going through the settings again and when I say again, I mean like for the umpteenth time.  I think there is a disconnect with SPD and the list.  I replicated my scenario elsewhere on this site and it works as is.  I'm just going to dump the list and restart from scratch.  I don't have much to lose at this point and would not like to have issues down the road. 

Thanks guys,


Mar 26, 2012 at 7:43 PM

No problem... Good Luck.

Mar 26, 2012 at 9:01 PM


Not sure if you've got multiple content types in the child list, but try the steps outlined in this blog post: http://joshmccarty.com/2011/02/sharepoint-custom-list-with-custom-content-types-and-custom-display-forms/

I don't know how well that translates to 2010, but the basic idea is to set your content type as the default content type for the list, then open a fresh instance of SPD and set that content type's NewForm to your custom form. Then close SPD. Now rinse/repeat for any other content types in the list. Once you've assigned all of the NewForms then you can reset the content type order for the list.

Good luck!