Ask a questionAsk a question
 

Question"Add new event" hyperlink points to copy of newform.aspx

  • Tuesday, November 03, 2009 7:40 PMAnirudh123 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I inserted a new webpart from a list of calendar type. Within webpart properties I set it to show 'summary toolbar' only which brings up the below option.

    Add new event

    The above hyperlink always directs to a NewForm_Mar.aspx (copy of the newform.aspx which I had copied and did some testing a while back). However the "New" button within the calendar points to newform.aspx.  I checked the source code within SPD and it points to "URL_NEW" which seems to be reading from CAML or system. Are there any tools to find out what & all the LIST has stored within it?

    How do I ensure that the above hyperlink points to "newform.aspx" always?. I checked the "supporting files" for the calendar list and it has "newform.aspx" only.


    please suggest.

All Replies

  • Wednesday, November 04, 2009 5:41 AMAshwin A. Bhagwat Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You can give relative URL of your newform.aspx to href under <a> tag.
    Ashwin B. | My Blog | Twitter
  • Wednesday, November 04, 2009 1:33 PMAnirudh123 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I did that but it it like hardcoding.

    So I want to use URL_NEW itself and is there a way to find out URL_NEW value?
  • Friday, November 06, 2009 7:36 AMXue-Mei Chang-MSFTMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,

    By default, the value of $URL_New is URL of NewForm.aspx page; I think it is read from Database, you cannot get the value out of the box. As Ashwin Bhagwat said, if you want the hyperlink to redirect to your custom page, you can change the $URL_New in the <a> tag.

    Hope it helps.


    Xue-Mei Chang
  • Friday, November 06, 2009 3:52 PMAnirudh123 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I understand but here is the problem.

    I have a modified copy of 'newform.aspx' named "newform_copy(1).aspx" which I do not want to use anymore. But now in some places where USERS click on "new" it takes to ""newform_copy(1).aspx" and in some places "newform.aspx".

    I would want to know a way of any command or tools that will set the value for URL_NEW. I am not referring to updating it directly in database. If there is custom code to update URL_NEW to a proper value, I can do the same.

    Please share your ideas.

    thanks.

  • Friday, November 06, 2009 4:23 PMLauraRogers Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Open your site in SharePoint Designer.  On the left, navigate to this particular calendar list under Lists.
    Click to select the Calendar.  Right-click on the calendar, and choose "Properties.
    Click the <Supporting Files> tab.
    In the New Item Form box, click to Browse to the correct form, and SAVE.


    Laura Rogers, MCSE, MCTS
    SharePoint911: SharePoint Consulting
    Blog: http://www.sharepoint911.com/blogs/laura
    Twitter: WonderLaura
  • Friday, November 06, 2009 6:03 PMAnirudh123 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    thanks for reply.

    it has newform.aspx from beginning itself. This is why I had thought URL_NEW should pickup newform.aspx but at some places it picks up my copy of newform.aspx

    this is the problem I am facing...
  • Friday, November 06, 2009 6:36 PMLauraRogers Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    In my solution, you can do that to change it back to use the NewForm.aspx as opposed to your custom one.  Did you try it yet?
    Laura Rogers, MCSE, MCTS
    SharePoint911: SharePoint Consulting
    Blog: http://www.sharepoint911.com/blogs/laura
    Twitter: WonderLaura
  • Friday, November 06, 2009 6:48 PMAnirudh123 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    The supporting files for the LIST (under properties) has "newform.aspx" for NEW event. I had checked this long back and I checked now also. It has "newform.aspx".

    With the above settings,  in some cases (such as "Add new event", which comes in a webpart with summary toolbar) it points to the copy-of-newform.aspx when users clickc on "Add new event". Upon checking in SPD I found that "Add new event" points to URL_NEW.

    Thanks.