0

Could any one of you please help me how to change the URL of add/edit/view Item.

The things is when user clicks on Add/Edit/View item, It's showing a dialogue box by default..

I want to redirect to another page once user clicks on "Add/Edit/View Item" instead of dialogue box.

I have search in Google for this and there is a way to do this with the coding

Could anyone of you please help me how we can do this SP designer.

Eg: I want to redirect From http://Test/Project/Lists/Changes/AllItems.aspx

To: http://Test/Project/Pages/CustomAddNewItem.aspx

using ( var ctx = new ClientContext( url ))

{

var list = ctx.Web.Lists.GetByTitle( 'List' ); list.DefaultNewFormUrl = newFormUrl;

list.Update();
ctx.Load( list );
ctx.ExecuteQuery();

}

Thanks,

Venkat

4
  • If you just wanna get rid of the modal dialog, just go to list settings > advanced settings > go to the bottom and set "Launch forms in a dialog?" to No. May 28, 2015 at 10:14
  • Hi, Thanks for quick reply.... I did follow your step just now.. Now it's not showing the dialogue box. Could you please help me how to change the URL when click on add new item.. Thanks:)
    – Venkat
    May 28, 2015 at 10:31
  • See Naveen's answer as this is the correct one. :) May 28, 2015 at 10:32
  • Hi, Could you please suggest me how to delete the existing OOB WebPart and add custom web part to the "Add New Item" list. Thanks :)
    – Venkat
    May 28, 2015 at 10:35

1 Answer 1

1

Are you looking to create a custom New List Form from Designer which is still a List form? OR You would like to have a web part page and add your custom web part to it and make use of it as a new form for your custom list?

If so, you can edit the default New form list page (http://Test/Project/Lists/Changes/NewForm.aspx) directly and delete the existing OOTB web part and place your custom webpart.

Let me know if you have any questions.

2
  • Hi, Thanks for quick reply.... Yes You are correct. I would like to have a web part page and add web part to it and make use of it as a new form for the list. But my web part page is there in at site level. Could you please tell me steps to redirect to the custom webpart page when click on Add new item.
    – Venkat
    May 28, 2015 at 10:25
  • Why don't you add your custom web part to the existing new list form? All you need is just to edit your Test/Project/Lists/Changes/NewForm.aspx and delete the existing OOTB web part and add your custom web part.
    – Naveen
    May 28, 2015 at 11:02

Your Answer

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

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