1

I have developed a custom SharePoint solution which is consisted of one ASPX application page. Now, I would like to integrate that functionality in list item edit form. I have decided to create a custom edit form in SharePoint Designer and to add an <iframe> element to the bottom of the page. This <iframe> would point to my page and embed it.

However, there are a couple of issues with that approach:

  1. Since my custom page contains a button which submits the content, including that button in the edit form and clicking on it would do strange things to the basic functionality of the form itself. Ideally, it would be great if the logic behind those buttons executes when the user saves the changes on the edit form, i.e. clicks the default Save button on the form. But how do I do that?
  2. My custom page takes the item id from the page URL as a parameter and I don't know how to include that parameter to the scr property of the <iframe> element.

I assume that using <iframe> is not the best option here, but if I just place the ASPX elements directly on the edit form, how do I get the EditForm code-behind in order to implement my custom logic?

Also, how do I include the logic that I need to the default one related to the action when the user clicks Save button on the form?

If someone could just point me in the right direction, or to some resources with code examples, that would be perfect! Thanks.

1 Answer 1

1

I think i would make your custom aspx application do everything that needs to be done and not depend on the OOTB edit form. Then on the ootb edit form, just put some redirect code on the page to take them to your custom application. To the end user it should be a pretty seamless experience. Especially if this is SP 2010 and your edit page is in a modal.

5
  • That's a great approach, I like it. I have only two questions: 1. how do I set the edit form to redirect to /_layouts/mysolution/myform.aspx, and 2. how do I make the page in modal?
    – Boris
    Commented Jun 5, 2012 at 7:55
  • I solved these questions myself by implementing feature listener which sets the path for edit form to my custom application.
    – Boris
    Commented Jun 5, 2012 at 12:35
  • Ok, cool sounds good. If you are using SP 2010, the edit forms are normally already in a modal. Commented Jun 5, 2012 at 13:47
  • Yeah, I understood that once I read your reply while being really focused. Thanks! By the way is there a way to quickly render the EditForm and then to just remove or adjust the rows that I don't need and extend the logic behind the Save button? This is exhausting, having to recreate the functionality for People or Group and Managed Metadata fields...
    – Boris
    Commented Jun 5, 2012 at 15:21
  • Since your app is in SharePoint, why can't you just use the ootb controls? Take a look at this codeplex project and how they implemented it: sp2010batchedit.codeplex.com Commented Jun 5, 2012 at 19:25

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.