自定义窗体上的弹出窗口字段帮助 [英] Pop-Ups Field Help on Custom Form
本文介绍了自定义窗体上的弹出窗口字段帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
寻找一种简单的方法来在自定义表单上添加格式化的弹出窗口以获取现场帮助....
Looking for an easy way to add formatted pop-ups for field help on a custom form....
推荐答案
您好,
我们可以使用SharePoint JS库来实现它.
We can use the SharePoint JS library to achieve it.
<script src="//code.jquery.com/jquery-3.1.0.min.js" type="text/javascript"></script>
<script type="text/javascript">
(document).ready(function(){
(document).ready(function () {
(#CustomPopup" ;).click(function(){ popup_openModalDialog() }); }); //模态对话框 函数popup_openModalDialog(){ //为对话框创建HTML内容 var html = document.createElement('div'); html.innerHTML ='< h3>欢迎使用SharePoint</h3></p></p> \ < a href =#" onclick ="SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK);返回false;"确定|</a> \ < a href =#" onclick ="SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.cancel);返回false;>取消</a>'; //确定(取消)= 1,取消(继续)= 0 //使用设置选项打开对话 OpenPopUpPageWithDialogOptions({ 标题:帮助", html:html, 宽度:400, 高度:125, dialogReturnValueCallback:function(dialogResult){ //SP.UI.ModalDialog.RefreshPage(dialogResult); if(dialogResult == SP.UI.DialogResult.cancel){ } } }); } </script> < input id ="CustomPopup"; type ="button"值=打开弹出窗口"/>
("#CustomPopup").click(function(){ popup_openModalDialog() }); }); //Modal Dialog function popup_openModalDialog() { //Create HTML Content for Dialogue Box var html = document.createElement('div'); html.innerHTML = '<h3>Welcome to SharePoint</h3></p></p>\ <a href="#" onclick="SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK); return false;">OK |</a>\ <a href="#" onclick="SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.cancel); return false;"> Cancel</a>'; //OK(Cancel)=1, Cancel(Continue)=0 //Open Dialogue with Set Options OpenPopUpPageWithDialogOptions({ title: "Help", html:html, width:400, height:125, dialogReturnValueCallback: function(dialogResult){ //SP.UI.ModalDialog.RefreshPage(dialogResult); if(dialogResult== SP.UI.DialogResult.cancel){ } } }); } </script> <input id="CustomPopup" type="button" value="Open Popup"/>
http://wp.ahcheng.com/2013/04/09/calling-dialog-modal-form-in-sharepoint-2013/
Or we can use jQuery UI to achieve it.
最好的问候,
Dennis
这篇关于自定义窗体上的弹出窗口字段帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文