我已创建一个具有类型选择的列表和相同的设置描述。我已将单选按钮设置为“使用”显示选择。 当我点击添加新项目时,说明在底部显示。有没有办法,我们可以使用jQuery / Designer / CSS来显示“顶部”的描述,其中包含释放UI格式。附加图像是一个例子

我知道我们可以通过InfoPath进行,但我在编辑item.aspx页面中有一些Java脚本,所以使用InfoPath dodnot套件这个要求

有帮助吗?

解决方案

我确定有改进的空间,但这是一个工作样本。

jQuery(document).ready(function () {

    //narrow down matching to dialog boxes only
    if(location.href.indexOf('IsDlg=1') !== -1)
        {
           $(".ms-dialog td.ms-formbody > span > table > tbody > tr:first-child > td > span.ms-RadioText").each(function(){

               //console.log('found the first option of the current choice list');

               var descriptionElement = $(this).closest('.ms-formbody').contents().filter(function(){ return this.nodeType != 1; });
               var descriptionText = $(descriptionElement).text();
               $(descriptionElement).remove();
               $(this).closest('.ms-formbody').prepend('<span>' + descriptionText + '</span>');

           });
    }
 });
.

其他提示

感谢 Tiago提供解决方案。所以这是代码如果要移动描述多行文本。

$("td.ms-formbody > span > textarea.ms-long").each(function(){


 var descriptionElement = $(this).closest('.ms-formbody').contents().filter(function(){ return this.nodeType != 1; });
  var descriptionText = $(descriptionElement).text();
   //alert(descriptionText);
 $(descriptionElement).remove();
 $(this).closest('.ms-formbody').prepend('<span>' + descriptionText + '</span>');
 $('.ms-long').css({'height':'auto','display':'block','margin-top':'10px'});
});
.

许可以下: CC-BY-SA归因
scroll top