locked
custom editform.aspx with dataform webpart RRS feed

  • Question

  • we created a custom editform.aspx for a sharepoint custom list and added  custom list form/dataform webpart (insert-->sharepoint controls-->custom list form)  control
    to the webpart zone and set the visibility of default "ListFormWebPart" to false.

    some of the  form field controls (not required fields) are removed from the dataform webpart. we are able to open an item in edit mode using this custom edit
    form and save the  list item.

    The strange thing we noticed is that this edit form(editform.aspx) always opens in  EDIT mode (with page | Workflow | Tools | Save and stop editing)

    links on the page(below the navigation control). though  "save and stop editing"  link is clicked the page is posting to the server but with no luck, still able to see those links.

    We noticed this only with editform.aspx but not with Newform.aspx,displayform.aspx.

    Environment: MOSS 2007 + SP2

    • Changed type Mike Walsh FIN Wednesday, September 2, 2009 3:38 AM always use the question type so people get credit for their replies to you
    • Edited by sai.bolla Wednesday, September 2, 2009 7:06 PM
    Tuesday, September 1, 2009 9:55 PM

Answers

  • I had the same issue.  We also use MOSS 2007 + SP2.  My site also has the publishing feature enabled. 
    I also found that if I made a list template from the list I discuss above, even though the new list would make my changes a default on the editform, I had to go in to the form and add the custom form web part and close the default web part in order to not get the page to open in edit mode.  I realize this isn't a fix but it is a workaround that worked for me.  Thank you

    • Marked as answer by Mike Walsh FIN Monday, November 15, 2010 12:08 PM
    • Edited by Mike Walsh FIN Monday, April 4, 2011 7:40 PM do not waste screen space with full-quote
    Friday, May 14, 2010 12:32 AM

All replies

  • This is what we noticed.

    We could not replicate the above on  server with SP1 (Moss 2007 + SP1). We noticed only for the machines where SP2 was installed.

    if  the feature "Office SharePoint Server Publishing" is turned off  we can't see "page | Workflow | Tools | Save and stop editing" links on the page. But we need the feature "Office SharePoint Server Publishing" to be active.


    Any help is appreciated.
    Tuesday, September 1, 2009 10:18 PM
  • I have this problem to, did you find a solution yet?
    Tuesday, September 22, 2009 7:49 PM
  • Can you guys say what you see as the actual problem?  As I'm reading through what you've posted, you've described some behavior, but you haven't said what it is you have an issue with.  Or am I missing it?

    M.
    Marc D Anderson - Sympraxis Consulting LLC - Marc D Anderson's Blog - @sympmarc
    Wednesday, September 23, 2009 2:32 AM
  • The problem is that the Page Editing Toolbar is always shown after customizations to the EditForm.aspx.

    I'm having this problem after adding a WebPart to the EditForm.aspx of a SharePoint list. The WebPart that I'm adding is a Content Editor WebPart with some css, to hide fields for certain audiences.

     

    1 To enable audience targeting I activated the Publishing features.

    2 Open EditForm.aspx in edit mode by appending the query string “?ToolPaneView=2&PageView=Shared”

    3 Add a Content Editor WebPart with some css to hide fields.

    4 Save the page by clicking “Exit Edit Mode”.

     

    Now when I try to edit an item the green Page Editing Toolbar is always shown, even if the user doesn’t have permissions to edit the page. Clicking “Save and stop editing” doesn’t have any effect.

    This toolbar (Without the customizations of course):
    http://i.msdn.microsoft.com/Cc296355.00d59aff-ed36-4646-98ba-0e64bc31b7d6(en-us,office.12).gif

    MOSS version: 12.0.0.6421

    • Edited by HeldereM Wednesday, September 23, 2009 8:10 AM SP version added
    Wednesday, September 23, 2009 8:09 AM
  • One of the options in the Site Actions is, I think, something like "Hide the Page Editing Toolbar".  If you choose this, it should make the toolbar go away for you.  I'm surprised that others are seeing it.  Try that setting and see if it solves the problem.

    M.
    Marc D Anderson - Sympraxis Consulting LLC - Marc D Anderson's Blog - @sympmarc
    Wednesday, September 23, 2009 1:20 PM
  • One of the options in the Site Actions is, I think, something like "Hide the Page Editing Toolbar".  If you choose this, it should make the toolbar go away for you.  I'm surprised that others are seeing it.  Try that setting and see if it solves the problem.

    M.
    Marc D Anderson - Sympraxis Consulting LLC - Marc D Anderson's Blog - @sympmarc

     Thanks for your reply.

    Unfortunately that menu option is not available; I'm guessing this is because this page officially cannot be edited. Checking out and in the page also doesn’t help :(

    Wednesday, September 23, 2009 2:17 PM
  • Have you or anyone else found a solution to this (?)   We recently upgraded our staging environment to SP2 and are experiencing the same problem with a custom editform that didn't exhibit this behaviour before.  Thanks.
    • Proposed as answer by Aymeric.mallet Monday, December 21, 2009 1:27 PM
    • Unproposed as answer by Mike Walsh FIN Monday, December 21, 2009 3:50 PM
    Tuesday, December 15, 2009 11:07 PM
  • You should deactivate et reactivate, publishing feature. Your menus "Modify page" & "Stop Modifying..." will be back ...
    And the EditForm.aspx won't be in publishing mode any more
    • Proposed as answer by Aymeric.mallet Monday, December 21, 2009 1:30 PM
    • Unproposed as answer by Mike Walsh FIN Monday, December 21, 2009 3:50 PM
    Monday, December 21, 2009 1:29 PM
  • Aymeric.mallet:

    Please don't propose your own posts as answers. That's not helpful.

    Propose the good *answers* of other people. That IS helpful when they really are answers.

    Here proposing a post where someone says "Have you found a solution to this" is not at all helpful.


    FAQ sites: (SP 2010) http://wssv4faq.mindsharp.com; (v3) http://wssv3faq.mindsharp.com and (WSS 2.0) http://wssv2faq.mindsharp.com
    Complete Book Lists (incl. foreign language) on each site.
    Monday, December 21, 2009 3:52 PM
  • have you find any solution to this problem ?

    I've tried to deactivate/activate the Publishing features of my site but the problem is still present.

    Have I to activate/deactivate the publishing feature of all Site Collection ?

    thanks in advance to all.
    Tuesday, January 26, 2010 10:55 AM
  • Did anybody find a solution to this? I am also having the same issue with editform after adding a web part on it using designer.
    Thanks, Arpit
    Wednesday, March 10, 2010 7:00 PM
  • I had the same issue.  We also use MOSS 2007 + SP2.  My site also has the publishing feature enabled.

    I was NOT able to hide the toolbar as both Edit page and Hide toolbar were disabled in the site actions menu.

    At first I did the following:

    1. Hid the original form.
    2. added 2 web zones to page
    3. 1st webzone had a content editor web part in it with code to display the ID of the item at the top of the form. (javascript)
    4. 2nd zone was for my custom form web part.  I changed 2 items in the custom edit form to be text only (not editable) as we didn't want users having to tab through a field that didn't need to be changed.
    5. Renamed my custom form so it didn't come up as [2].
    6. Set to no chrome.

    Upon saving I got the same toolbar issue everyone else did.  I started over but changed the first step.

    1. Closed the original form.
    2. added 2 web zones to page
    3. 1st webzone had a content editor web part in it with code to display the ID of the item at the top of the form. (javascript)
    4. 2nd zone was for my custom form web part.  I changed 2 items in the custom edit form to be text only (not editable) as we didn't want users having to tab through a field that didn't need to be changed.
    5. Renamed my custom form so it didn't come up as [2].
    6. Set to no chrome.

    The toolbar and edit mode disappeared and I no longer had the problem.

    I do not know if the original form has to be closed or if it was just my particular problem, but I wanted to share what I did in the hopes it helps someone else.  It still does not explain why it does it though.

    Thank you.

    Kiki

     

    Thursday, May 13, 2010 6:40 PM
  • I had the same issue.  We also use MOSS 2007 + SP2.  My site also has the publishing feature enabled. 
    I also found that if I made a list template from the list I discuss above, even though the new list would make my changes a default on the editform, I had to go in to the form and add the custom form web part and close the default web part in order to not get the page to open in edit mode.  I realize this isn't a fix but it is a workaround that worked for me.  Thank you

    • Marked as answer by Mike Walsh FIN Monday, November 15, 2010 12:08 PM
    • Edited by Mike Walsh FIN Monday, April 4, 2011 7:40 PM do not waste screen space with full-quote
    Friday, May 14, 2010 12:32 AM
  • Ok. Also same issue to me. After try 'n error I came up with this approach:

    I made a new Editform.aspx (no copy), put in the custom list form of my list, added a webpart zone below with a CEWP in it and finally linked the List to the new Editform. It seems to work.

    The MOSS 2007 was service 2 packed and the publishing feature was enabled on web and site-scope.

    Tuesday, May 18, 2010 12:40 PM
  • Same problem. Only happens in the "EditForm.aspx".

    Are there any other solutions than creating a new custom EditForm.aspx ?

    The weird thing is, when you click on the "save and stop editing"-button, a new version of the actual opened list-item will be created, no effect on the page itself. It seems like it gets confused between the list-item and the page.

    And when you activate the "Check out"-menu from the "Page"-menu, an exception error occurs:

    [NullReferenceException: Object reference not set to an instance of an object.]
       Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions.CheckOutAction.RaisePostBackEvent(String eventArgument) +187
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

    Is this issue marked as a bug ?

    Tuesday, June 22, 2010 12:24 PM
  • Here is what worked for me:

    Follow the instructions for creating a custom list form page here with the following modifications:

    http://office.microsoft.com/en-us/sharepoint-designer-help/create-a-custom-list-form-HA010119111.aspx

    1) Create the new page, but do not add the custom list form yet - just create a new aspx page within the list or library where you will want it.  Delete all of the html code

    2) Create a copy of the default editform.aspx page, put it in code view, copy lines 1-18 to your new page (your final 3 lines of code you will copy are):

    <table cellpadding=0 cellspacing=0 id="onetIDListForm">
     <tr>
      <td>

    3) Hit enter twice then copy lines 57-92 to your new page.

    4) Put your cursor between the <td> from Step 2 and the </td> from Step 3.  Select Insert > SharePoint Controls > Custom List Form

    5) Pick your list you want to create the custom edit form for, choose your content type, then choose the edit form option, keep the show toolbar option active and click ok.  Your new custom form will appear and you can go about your modifications.

    One interesting thing about this design pattern is your page will not appear as customized within SharePoint Designer as well.  Not sure why however.

     

     

    Friday, June 25, 2010 9:08 PM
  • We have the same issue with dataviews. When viewing this custom page, the DesignConsol bar would always show Page in Draft mode. If we hit Stop Editing nothing happens. Worst is if you had Checkout the custom page in Designer prior, the Check in will cause an error and the custom page's content will be deleted from the server with an empty WebPartZone left. Very, very annoying.

    What we noticed is if the list linked to the dataview in the custom pages is configured with versionning and content approval, the DesignConsol bar will always show up when viewing the custom pages. It's like SharePoint thinks the custom page it's self has approval and versionning, but the fact is only the dataview's linked list has versionning. Disabling content approval on the list fixes the issue displaying the DesignConsole bar but, to work around loosing your custom code is to not use Checkout/checkin on custom pages. I don't even understand why the Checkout/checkin appears in Designer for lists that don't have it enabled...

    It would be nice to find a permanent solution to this problem...right now we can't use dataviews on lists with approval enabled!

    • Proposed as answer by e_mc_square Saturday, October 23, 2010 9:36 AM
    • Unproposed as answer by Mike Walsh FIN Monday, November 15, 2010 12:08 PM
    Friday, August 20, 2010 7:39 PM
  • Anyone has found any solution to this problem?

    I have many customized edit forms. Once I installed SP2, the edit form always opens in draft mode.  It would be very painful recreating all list from scratch again.

    I turned off and on the publishing feature, but the problem remains.

    Please… Help!


    Marta Almeida
    Wednesday, October 13, 2010 9:16 AM
  • Hi,

    Has anybody got solution for the issue?

    After upgrading our servers from and MOSS SP1  to MOSS SP2 and with the new installation of MOSS SP2(Not upgraded) we are facing the issue of only EditForm.aspx being in "Edit Mode" state and page editing tool bar is visible. Even if i click "Save and Stop Editing" the page always shoes page editing tool bar


    mallikarjun
    Friday, October 22, 2010 6:43 AM
  • People here is a easy way to handle this:  ( i also faced this problem and it was indeed strange, but anyhow this should help )

    The two steps involved are:

    1. Hide the Panel from appearing via css internal styling

    2. Remove the Panel and related functionality using Jquery.

     

     Place the following code inside a / the content editor web part on edit form page :

    ---------------

     

    <script src="/sites/xxxxxx/xxxxxx/pathtojquery/jquery-1.3.2.min.js" type="text/javascript"></script>

    <style type="text/css">
    /*GP: Hide the Page editing toolbar initially */
    #ctl00_SPNavigation_ctl01_authContainer1
    {
       display:none;
    }
    </style>


    <script type="text/javascript">
    /*GP: Stopping the pop up related function from being invoked */
    window.onbeforeunload=DisableRefreshOnFocus;

    /*GP: Removes the publishing mode edit page panel related content */
    $(document).ready(function()
     {       
         $('#ctl00_SPNavigation_ctl01_authContainer1').remove();   
     });
    </script>

    ----------------------------------------------

    Note: Attachments for list items seem to be working fine as well now.

     

    br,

    Godwin

    • Proposed as answer by e_mc_square Wednesday, October 27, 2010 5:11 AM
    • Unproposed as answer by Mike Walsh FIN Monday, November 15, 2010 12:08 PM
    Saturday, October 23, 2010 8:41 AM
  • Worked for me!

     

    THANKS!


    Marta Almeida
    Monday, October 25, 2010 12:07 PM
  • My 2 cents:

     

    Went to Site Features.

    Deactivated "Office SharePoint Server Publishing" feature.

    Page editing toolbar does not appear anymore.

    Note, I didnt need it, so I kept it deactivated. If you'll activate it, page editing toolbar will appear again.

    Thanks,

    Rehman.


    Rehman Gul
    Sunday, November 14, 2010 11:29 PM
  • Hi Mike ,

       Did you face any problem using the scripts i mentioned above. It seems to be working fine for me  and Marta.

     Would be good to know if something is amiss.

     

     

    Wednesday, November 24, 2010 9:05 AM
  • Hello guys,

    Does someone solved this problem!? It seems a bug....

    Tamil the scripts solution worked for me but the container around the fields still remains!

    Anyway if someone knows if there is something to solve this problem, please share it!

    Thanks in advanced.


    André Rentes
    Monday, April 4, 2011 6:17 PM
  • > Did you face any problem using the scripts i mentioned above.

    It was unmarked as an answer by me because you proposed your own post as an answer.


    SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx
    WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
    Both also have links to extensive book lists and to (free) on-line chapters
    Monday, April 4, 2011 7:41 PM
  • This removed the page editing toolbar and the annoying"To save your changes before continuing, click "OK"..." message for me on editform.aspx pages that had been modified.  I am running SharePoint 2007 MOSS Standard, have publishing on, and made the change in SharePoint Designer.

    http://kitmenke.com/blog/2010/12/11/customizing-editform-aspx-in-a-publishing-site/


    Kim


    Tuesday, April 19, 2011 5:52 PM
  • Moderator Note:

    I am locking this thread.

    It is already very unwieldy and already contains several answers from people and confirmations of those answers.

    If you have similar problems with current versions of the SP products, *start your own thread*.

    Mike


    SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx
    WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
    Both also have links to extensive book lists and to (free) on-line chapters
    Wednesday, April 20, 2011 8:02 AM