locked
Open Edit form directly when list ITem is clicked in Sharepoint list RRS feed

  • Question

  • Hi all,

    I am new to Sharepoint programming.Previuosly I worked on WinForms.

    Coming to the question, I have a Custom list named 'Client'.When I click on the Title column of an item,by default it opens the Display/View form.

    My requirement is to open the Edit form directly.Please tell me how to achieve this.

    Many thanks in advance..!


    Thanks, Satish Bommideni Success usually comes to those who are too busy to be looking for it.

    Thursday, May 31, 2012 10:31 AM

Answers

  • Hi Ajit,

    Thanks for the reply.

    But I am unable to understand when you said

    "Title is rendered as an <a> tag with view link attached to it. Change that link to

    http://yoursiteName:port/ListName/Forms/EditForm.aspx?ID={}.

    Replace the curly brace with the token in existing link."

    When I opened the opened the code (Sharepoint Designer-> Advanced Mode-> Customize XSLT->Entire Code) I was confused where to add the code you mentioned can you be more specific at these steps.

    Thanks in advance.!


    Thanks, Satish Bommideni Success usually comes to those who are too busy to be looking for it.

    • Marked as answer by Spartan_578 Thursday, June 7, 2012 4:55 AM
    Friday, June 1, 2012 6:54 AM

All replies

  • This is possible, Your Custom List 'Client' must have some views. Get the view in which you wanted to implement this feature.

    Open this view with sharepoint designer and edit the view.

    You have to customize rendering of View(Title Column) i.e. Change xslt for it.

    Title is rendered as an <a> tag with view link attached to it. Change that link to

    http://yoursiteName:port/ListName/Forms/EditForm.aspx?ID={}.

    Replace the curly brace with the token in existing link.

    For more info follow this link

    http://msdn.microsoft.com/en-us/library/ff606773.aspx

    http://msdn.microsoft.com/en-us/library/ff630941.aspx#odc_sp14_qn_UsingSharePointDesigner2010WorkwithWebParts_ModifyXSLTListViewWebPart

    Thanks

    Don't forget to mark as answer or vote as helpful if it answers your query.


    ajit

    Thursday, May 31, 2012 11:33 AM
  • Hi Ajit,

    Thanks for the reply.

    But I am unable to understand when you said

    "Title is rendered as an <a> tag with view link attached to it. Change that link to

    http://yoursiteName:port/ListName/Forms/EditForm.aspx?ID={}.

    Replace the curly brace with the token in existing link."

    When I opened the opened the code (Sharepoint Designer-> Advanced Mode-> Customize XSLT->Entire Code) I was confused where to add the code you mentioned can you be more specific at these steps.

    Thanks in advance.!


    Thanks, Satish Bommideni Success usually comes to those who are too busy to be looking for it.

    • Marked as answer by Spartan_578 Thursday, June 7, 2012 4:55 AM
    Friday, June 1, 2012 6:54 AM
  • Hi Spartan_578,

    For this issue, please try the following steps:

    1. Open SharePoint Designer, find the list, open list AllItems.aspx page, advanced mode.
    2. Change the view to split mode.
    3. Put the mouse on one item Title field, to find the xsl easier, you can enter a backspace on the item Title.
    4. In the code view, the following code will be chosen:
      change the “$FORM_DISPLAY” to “$FORM_EDIT”
    <xsl:choose>
                                                                    <xsl:when test="$XmlDefinition/List/@TemplateType != 301">
                      <a onfocus="OnLink(this)" href="{$FORM_EDIT}&amp;ID={$ID}&amp;ContentTypeID={$thisNode/@ContentTypeId}" onclick="EditLink2(this,{$ViewCounter});return false;" target="_self">
                                                                    <xsl:call-template name="LinkTitleValue.LinkTitle">
                                                                    <xsl:with-param name="thisNode" select="$thisNode"/>
                                                                    <xsl:with-param name="ShowAccessibleIcon" select="$ShowAccessibleIcon"/>
                                                                    </xsl:call-template>
                      </a>
                                                                                                                                    
                                                                                                                    </xsl:when>
                                                                    <xsl:otherwise>
                        <a onfocus="OnLink(this)" href="{$FORM_EDIT}&amp;ID={$ID}" onclick="GoToLink(this);return false;" target="_self">
                                                                    <xsl:call-template name="LinkTitleValue.LinkTitle">
                                                                    <xsl:with-param name="thisNode" select="$thisNode"/>
                                                                    <xsl:with-param name="ShowAccessibleIcon" select="$ShowAccessibleIcon"/>
                                                                    </xsl:call-template>
                      </a>
                  </xsl:otherwise>
                                                                    </xsl:choose>
                                                                    <xsl:if test="$thisNode/@Created_x0020_Date.ifnew='1'">
                                                                                    <xsl:call-template name="NewGif">
                                                                                    <xsl:with-param name="thisNode" select="$thisNode"/>
                                                                                    </xsl:call-template>
            </xsl:if>
          </xsl:otherwise>
                                                    </xsl:choose>

    Thanks,
    Qiao


    Qiao Wei

    TechNet Community Support

    • Proposed as answer by TheDrape Friday, August 25, 2017 7:56 PM
    Tuesday, June 5, 2012 3:22 AM
  • Hi Qiao Wei,

    Thanks for the reply..!

    It's working fine,but when I click on the item in the Title column, the Edit form is opening in the same page rather than opening in a pop-up.

    My exact requirement is to show the Edit form as a pop-up, instead of in the same page.

    Thanks in advance..!


    Thanks, Satish Bommideni Success usually comes to those who are too busy to be looking for it.

    Tuesday, June 5, 2012 5:58 AM
  • Hi Spartan,

    From my testing, it works as expected, when click on the item, it opens the item edit page, and shows as modal dialog, as you said opening in a pop-up.

    Please check whether you have modified in the right place, keep others the same with no change.

    Thanks,


    Qiao Wei

    TechNet Community Support

    Wednesday, June 6, 2012 7:44 AM
  • Thanks all for your responses..This issue is solved now..

    Thanks, Satish Bommideni Success usually comes to those who are too busy to be looking for it.

    Thursday, June 7, 2012 4:56 AM
  •  
    1. I was able to accomplish this in SharePoint designer.
    2. Edit the site that contains the list in SharePoint designer.
    3. In Navigation click Lists and Libraries.
    4. In the display area click the List name that you want to change the form for.
    5. Locate the Content section of the display and click once on the Item Content Type or the content type associated with your link item. This will display the settings for the content type.
    6. Locate the Forms area. In the Forms area the URL the default form for the Display, Edit and New for the content is displayed and can be edited by clicking the URL.

    1. I just changed the displayifs.aspx to editifs.aspx for the display form. In my case I was using a custom form, but you change the Display Form value "~list/EditForm.aspx" and it should work. I tried this with a task list and a custom list with success on both.

    TheDrape

    • Proposed as answer by TheDrape Friday, September 14, 2012 12:31 AM
    • Unproposed as answer by Hemendra Agrawal Wednesday, November 27, 2013 6:58 AM
    • Proposed as answer by paradronmedic Friday, October 9, 2015 4:00 PM
    Friday, September 14, 2012 12:30 AM
  • hello,

    how i can do it in sharepoint 2013?

    thanks,

    asaf

    Tuesday, April 29, 2014 1:05 PM