简体   繁体   English

SharePoint 2013 NewForm.aspx上的其他按钮

[英]Extra Buttons on SharePoint 2013 NewForm.aspx

I have a site, when the user completes viewing items on the site, they click a complete button (that was hidden until they completed the required tasks) that pops up a NewForm for the attendance list. 我有一个网站,当用户完成查看网站上的项目时,他们单击一个完成按钮(在完成所需任务之前一直隐藏),该按钮会弹出一个用于出席者列表的NewForm。 Once the user adds their name and clicks save, the NewForm should close. 用户添加名称并单击“保存”后,NewForm应该关闭。 I created a NewForm (NewForm_CloseAfter.aspx) and pointed the site to open the NewForm_CloseAfter.aspx (no problems so far). 我创建了一个NewForm(NewForm_CloseAfter.aspx),并指向该站点以打开NewForm_CloseAfter.aspx(到目前为止没有问题)。

See code below. 请参见下面的代码。 I commented out the SharePoint button and added the html input button. 我注释掉了SharePoint按钮,并添加了html输入按钮。

The problem: My html input button at the bottom of the form works fine. 问题:表单底部的html输入按钮运行正常。 However, looks like the default save/cancel button is at the top with the default behavior of submitting the information and showing the list (unwanted behavior) 但是,看起来默认的保存/取消按钮在顶部,具有默认的提交信息和显示列表的行为(不需要的行为)

The Question: How can I remove the default buttons at the top of my form? 问题:如何删除表单顶部的默认按钮?

Thanks 谢谢

 <tr> <td class="ms-toolbar" nowrap="nowrap"> <table> <tr> <td width="99%" class="ms-toolbar" nowrap="nowrap"><IMG SRC="/_layouts/15/images/blank.gif" width="1" height="18"/></td> <td class="ms-toolbar" nowrap="nowrap"> <!--<SharePoint:SaveButton runat="server" ControlMode="New" id="savebutton2"/>--> <input name="Submit1" type="submit" value="Save" id="savebutton2" style="width:75px" onclick="javascript: {ddwrt:GenFireServerEvent('__commit')}; window.alert('Item updated.') ; window.close();" /> </td> <td class="ms-separator">&#160;</td> <td class="ms-toolbar" nowrap="nowrap" align="right"> <SharePoint:GoBackButton runat="server" ControlMode="New" id="gobackbutton2"/> </td> </tr> </table> </td> </tr> 

Edit the your custom new form in designer and search for "savebutton1". 在设计器中编辑您的自定义新表单,然后搜索“ savebutton1”。 Find the surrounding tr and comment out it and you are done. 找到周围的tr并注释掉,您就完成了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM