선택 사항 표시 컬럼 유형에 대한 설명
-
29-09-2020 - |
문제
유형 선택이있는 목록을 만들고 설명을 설정합니다.나는 라디오 버튼을 "디스플레이 선택"으로 설정합니다.
새 항목 추가를 클릭하면 설명이 바닥에 표시됩니다.UI 형식을 잃어 버리고 jQuery / Designer / CSS를 사용하여 "top"에 대한 설명을 보여줄 수있는 방법이 있습니까?첨부 된 이미지는 예제
InfoPath를 통해 할 수 있지만 Item.aspx 편집 페이지에있는 Java 스크립트가 있으므로 InfoPath를 사용하여 이런 요구 사항이
해결책
나는 개선을위한 공간이 있다고 확신하지만, 여기에는 일하는 샘플이 있습니다.
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'});
});
. 제휴하지 않습니다 sharepoint.stackexchange