I have an edit form that I need to have commit data and then open another edit form with the same ID in a dialog. Previously I did not have to save data so I used

    onclick="javascript: OpenPopUpPage('EditForm2URL.aspx?ID={@ID}');"

Since I now have to save and then open the dialog I'm trying to use....

    onclick="javascript: {ddwrt:GenFireServerEvent('__commit')};OpenPopUpPage('EditForm2URL.aspx?ID={@ID}');"

When I do this the page saves then opens the dialog but refreshes and kicks the user out of the dialog before they can use it. Any way around this?

  • You are open the same EditForm with same ID twice? Mar 31, 2015 at 13:53
  • A different custom edit form. Basically the user enters a large amount of information, saves, then goes to the second edit form for a few additional fields.
    – TheDude
    Mar 31, 2015 at 14:01

1 Answer 1


This sounds like form chaining. There is a function for that in the SPServices libary.


This function allows you to redirect to a another page from a new item form with the new item's ID. This allows chaining of forms from item creation onward.

This will require you to include jQuery and the SPServices library though.

Example code

<script language="javascript" type="text/javascript">
    $(document).ready(function() {
            redirectUrl: "EditForm.aspx",
            qsParamName: "OrderID"

Code taken from SPServices SPRedirectWithID page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.