SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a default newform.aspx and i did add a PreSave Action function like so: I edited the default NewForm.aspx and i added my js just under the

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

  function PreSaveAction(){
        //Field was disabled so enabled it 

        return true;    

Its inside a script just didn't add it

But when i click the save button that field doesn't insert. Any ideas.Can i do this in a default NewForm.aspx page?

share|improve this question
Can someone guide me on this.I reid it with a custom list with also no luck. Cheers – naijacoder Mar 22 '12 at 7:09
Is this your actual code? If not, please edit your question with the real code. If so, as written, your javascript code should appear as plain text on your page because it is not inside script tags. – Rich Bennema Mar 22 '12 at 13:46
Thanks for the reply Rich.Basically with SP 2010 i needed to use PreSaveItems not PreSaveAction. The other question i need to ask is what do i need to do in PreSaveItems if i need to disable a textbox when the page is loaded and enable it on PreSaveItems and then Disable it back again. – naijacoder Mar 23 '12 at 0:53

Your Answer


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

Browse other questions tagged or ask your own question.