Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to add a custom webpart on a custom list form and remove the Save and Cancel buttons which are default. Is what i'm trying to do possible? If yes please tell me a good approach to do it?

Thanks.........

share|improve this question

1 Answer 1

One way at least is to use this CSS:

.ms-formtoolbar {
  display: none;
}
share|improve this answer
    
This is for 2013, and ListFormWebPart (I'm guessing you might be using both 2013 and this Web Part) –  eirikb Apr 14 at 10:30
    
i want to access something like the codebehind of the default save and cancel buttons? Is it possible? –  luckydeveloper Apr 14 at 10:47
    
If you have a completely custom form, then you should be able to edit the XSLT and just remove the buttons from there –  eirikb Apr 14 at 10:47
    
say if i hide the default save button by the code which you have mentioned and add a visual webpart on that form which has a save button by itself then will any event receiver related to the list run when i click on my custom save button? –  luckydeveloper Apr 14 at 10:52
    
That does sound like a horrible solution, but yes in theory that should work. Any button of type submit on the page should trigger a postback which should work as expected. –  eirikb Apr 14 at 10:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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