none
Sharepoint Online custom form error...

    Question

  • Hi all,

    I am currently working on a SharePoint Online site from a project site template and I wanted to create a new, custom from for adding tasks to the default tasks list. My default task list has some custom columns, but I still wanted to use the default task list, mainly because of the views, its integration with the site and mailing settings that are already there. Steps I followed:

    1. I launched SPD 2013 and opened my site
    2. navigated to the default tasks list
    3. in the Forms section clicked New,
    4. chose "New item form",
    5. Selected Task as the content type to use,
    6. did NOT mark it as default form
    7. checked to create link in list item and ribbon,
    8. typed a name
    9. clicked OK.
    10. Opened my site>task list in a browser...

    And the result is far from perfect:

    1. There's no link to the new form in the Ribbon; There's no entry about a custom action leading to this form from the Ribbon in SPD either, it only gets added to LIM.
    2. If I go from the LIM or type the url directly to a browser the form itself doesn't work: it throws a totally useless error "Sorry, something went wrong. An unexpected error has occurred" with no further info whatsoever. No log, no details, nothing.

    I checked the source code for the new form by comparing the files MyCustomForm.aspx and NewForm.aspx - it is EXACTLY the same as the NewForm.aspx (the default one for a new item) - to the letter, however, when I go to Web Part Maintenance Page for my custom form and for the default form there is a difference:

    • the default form has a ListFormWebPart
    • the custom form has a DataFormWebPart

    the code is the same when I open .aspx files by navigating there with Windows Explorer and opening them in a text editor. Within SPD thy have different code.

    I tried it also with setting the new form as a default one for this content type - the problem persists.
    The problem exists on any site I have on our company's Sharepoint, so it is not site-specific.
    The problem was replicated by our site-collection owner (or whatever you call the uber-admin in Sharepoint), so it is not related to permissions either.
    Any hints?

    Also at some point SPD decided not to show NewForm.aspx although the file was present on the server and I DID NOT touch it at all; Reverting the default form was only possible because sometime earlier I have copied the <ZoneTemplate> tag contents... No idea why...


    Monday, March 06, 2017 3:44 PM

Answers

  • Hi wilku_g,

    I have followed the steps according to your post, then the link of the custom new form is added into the list item menu not the ribbon. It is by design.

    Then I go from the list item menu or URL directly, the custom new form can work. There is no error message.

    And the default from has the ListFormWebPart, the custom form has the DataFormWebPart.

    To troubleshoot the issue, create other custom edit or display form in the SharePoint design to check if the same issue will occur.

    And you could create a new site collection in SharePoint admin center to check if the same issue will occur.

    And as a workaround, you could customize the form in InfoPath.

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by wilku_g Thursday, March 09, 2017 10:54 AM
    Tuesday, March 07, 2017 3:36 AM
    Moderator

All replies

  • Hi wilku_g,

    I have followed the steps according to your post, then the link of the custom new form is added into the list item menu not the ribbon. It is by design.

    Then I go from the list item menu or URL directly, the custom new form can work. There is no error message.

    And the default from has the ListFormWebPart, the custom form has the DataFormWebPart.

    To troubleshoot the issue, create other custom edit or display form in the SharePoint design to check if the same issue will occur.

    And you could create a new site collection in SharePoint admin center to check if the same issue will occur.

    And as a workaround, you could customize the form in InfoPath.

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by wilku_g Thursday, March 09, 2017 10:54 AM
    Tuesday, March 07, 2017 3:36 AM
    Moderator
  • Hey, 

    Thanks for your input. It most likely means there's something wrong with my site or the collection or the instance itself. I am not the admin though, so I have limited options of exploring the issue further. However thanks for addressing all of my concerns.

    Just as a remark - if "by design" the link on the ribbon is not created, then it would really make sense not to call the option "create link in item menu and ribbon"...

    I checked a custom edit form and it works fine, so it seems there's something wrong with new item creation. We will investigate that further.

    Tuesday, March 07, 2017 10:09 AM