且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SharePoint Online自定义保存在新项目中保存

更新时间:2023-12-01 22:33:28

你好Jeff,


1和2:


我们可以隐藏"保存"和"取消"按钮和一些使用CSS的字段并修改"保存"按钮到"提交"并提交并重定向到您的"谢谢"使用jQuery代码的页面。

< style> 
输入[value ='保存'] {
display:none;
}
输入[value ='取消'] {
display:none;
}
< / style>
< script src =" // code.jquery.com/jquery-1.11.3.min.js"类型= QUOT;文本/ JavaScript的&QUOT;&GT;&LT; /脚本&GT;
< script type =" text / javascript">


(function(){
ChangeSaveName();
GoToPage(" / Pages / ThankYou.aspx");
});
函数ChangeSaveName(){


(" a [id ='Ribbon.ListForm.Edit.Commit.Publish-Large']。ms-cui-ctl-largelabel" )的.text([提交&QUOT);
}
函数GoToPage(pageUrl){
var stringURL = location.href;
if(stringURL.indexOf(" AllItems")> -1){
stringURL = stringURL.replace(stringURL.substring(stringURL.indexOf(" Source ="),stringURL.length ), '源=' + _ + spPageContextInfo.webAbsoluteUrl PAGEURL);
location.href = stringURL;
}

if(!(stringURL.indexOf(" Source =")> -1)){
location.href = location.href +"?源= QUOT; + _ + spPageContextInfo.webAbsoluteUrl PAGEURL;
}
}
< / script>


3。我们可以隐藏最终用户电子邮件字段,并在页面加载时使用jQuery设置默认值。


4。您可以设置列表权限来实现它。


***的问候,


Dennis



Hello everyone -

I'm muddling my way through learning SharePoint Online.  I've used it in the past, but obviously, things change.

Here's the scenario I need some help on (btw-this in SharePoint Online):

I have a list set up so that a Customer will log in and create a service request via the NewForm1.aspx (custom add record form) using SharePoint Designer:

  1. I have removed the Save and Cancel at the top of the form and I've removed a couple of the fields I do not want displayed.  I have also removed the Save from the toolbar on the form.  I would like to have the Save and Cancel removed from the bottom of the form.  The intent is to have all navigation take place from the toolbar on the New Item Form (i.e. a Submit and a Cancel button).
  2. I would like to have a "Submit" button that saves the record and takes the User to a custom "Thank You" page, which is already created.  I also have a Workflow set up to email the End User on the addition of a new list item being created.  I would also like to have a timer set so that after x amount of seconds, it would logout and/or close the browser tab.
  3. It would be preferable to have it set so that when a new item page is opened, the End User does not see anything other than the new form.
  4. I need to have another list that is an "Internal Comments" that is related to the original list item, but is not visible to the End User.

These are the most pressing items that I need to be able to fix ASAP.

I appreciate the help in advance.  I'm not a web programmer by any stretch of the means and I know what a beast SharePoint is.

Jeff

Hi Jeff,

1 and 2:

We can hide the "Save" and "Cancel" buttons and some fields using CSS and modify the "Save" to "Submit" and make submit and redirect to your "Thank You" page using jQuery code.

<style>
input[value='Save']{
	display:none;
}
input[value='Cancel']{
	display:none;
}
</style>
<script src="//code.jquery.com/jquery-1.11.3.min.js" type="text/javascript"></script>
<script type="text/javascript">


(function(){ ChangeSaveName(); GoToPage("/Pages/ThankYou.aspx"); }); function ChangeSaveName(){


("a[id='Ribbon.ListForm.Edit.Commit.Publish-Large'] .ms-cui-ctl-largelabel").text("Submit"); } function GoToPage(pageUrl){ var stringURL = location.href; if(stringURL.indexOf("AllItems")>-1){ stringURL = stringURL.replace(stringURL.substring(stringURL.indexOf("Source="),stringURL.length),'Source='+_spPageContextInfo.webAbsoluteUrl+pageUrl); location.href = stringURL; } if(!(stringURL.indexOf("Source=")>-1)){ location.href = location.href+"?Source="+_spPageContextInfo.webAbsoluteUrl+pageUrl; } } </script>

3. We can hide the End User email field and using jQuery set the default value when page load.

4. You can set the list permission to achieve it.

Best Regards,

Dennis