SharePoint Developer Center >
SharePoint Products and Technologies Forums
>
SharePoint - Design and Customization
>
"Add new event" hyperlink points to copy of newform.aspx
"Add new event" hyperlink points to copy of newform.aspx
- 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
- 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? 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- 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. - 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 - 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... - 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 - 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.


