2

Is there any way so when I click "Add new item" link in a list in office 365, that will redirect to a custom new form instead of default SharePoint form?

  • Did you try with the Designer? Create a NewCustomForm and change the default to it – Nk SP Aug 7 '14 at 10:22
  • Actually my task is not design a another form, just redirect the url to custom form whatever...., Is thr any method or logic for this – Renuga krishnan Aug 7 '14 at 11:04
  • 1
    Is this custom form a form of the list? Or just a page you created? If it's a list form, then you need to go to Designer and make it the default. – wjervis Aug 7 '14 at 11:16
  • I am trying to programmatically do this as well for O365. i would either like to direct them to my custom newform or modify the current newform to show a custom webpart. – Peter Aug 12 '14 at 19:32
1

On the NewForm.aspx add a Script Editor Web Part (from Media and Content) and add the following script:

<script type="text/javascript">
    window.location.replace(http://theListUrl/MyCustomNewForm.aspx);
</script>

But be careful. If you do, the only option to get it back to where it "normal" is to edit the NewForm.aspx in SharePoint Designer:

<WebPartPages:ScriptEditorWebPart runat="server" Content="
&lt;script type=&quot;text/javascript&quot;&gt;
window.location.replace(&quot;http://theListUrl/MyCustomNewForm.aspx&quot;);
&lt;/script&gt;" 
Title="Script Editor" Description="Allows authors to insert HTML snippets or scripts." 
ChromeType="None" ID="g_76a8a96c_1a2c_4f61_b1b4_6cb21575717e" 
__MarkupType="vsattributemarkup" __WebPartId="{76A8A96C-1A2C-4F61-B1B4-6CB21575717E}" 
WebPart="true" __designer:IsClosed="false" partorder="2"></WebPartPages:ScriptEditorWebPart>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.