Does anyone know the syntax, or the way to redirect a sharepoint "New Item Form" to a URL and pass values from the form as parameters in the URL?
So if the form as a "lastname" field, I would 开发者_运维知识库want the redirect to be something like http://path_to_other_page?name=lastname
I know I need to use something like: onclick="javascript: {ddwrt:GenFireServerEvent(concat('__commit;__redirect={path_to_other_page.aspx?name=',/dsQueryResponse/Rows/Row/@LastName))}"
Except that's not working for me - I think the "/dsQueryResponse/Rows/Row/@LastName" is not correct - I was just trying to guess from other posts I had seen here...
Anyone?
That looks like something that would work on an edit form rather than a new form - that data is loaded when the page is loaded, not when it is submitted. To get the data in javascript you will need to access the textbox directly - jquery may be helpful.
I think you can use the SharePoint's build in Modal dialog (http://msdn.microsoft.com/en-us/library/ff410058(v=office.14).aspx). Within the modal dialog, you can callback function that will get the parameters from the form page.
精彩评论