Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Add new lookup item on the fly

$
0
0

bcobra,

$().SPServices.SPLookupAddNew doesn't use SP2010 modal dialogs.  Perhaps Matthew is refering to this post where russgrove acheived similar using modals:

http://spservices.codeplex.com/discussions/228927

Sounds like your sessionStorage is working, but the newform is redirecting to a different URL as you said.  What specifically is different in the URL when you compare the before addnew and after addnew?  The function appends the current url to the 'source' querystring when you click addnew link.  This is meant to redirect you back to the same page.  This could be problematic if you're initial form (the one with the lookup column) is opening in a modal dialog.  What happens if you disable dialogs on that list? Have you tried setting option newWindow: true ? 

The prob with committing the item to the list before addnew is if you're part way through the form and have required fields not yet filled.  That idea is also discussed in the post above.  If required fields are not an issue, then you could try to commit and then redirect with ID, but I think it would be more difficult than going with the modal approach by russgrove.

HTH,

Josh


Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>