tags:

views:

148

answers:

1

Hello;

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?

A: 

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.

Tom Clarkson