문제

please help me. I've got custom New event formular and I need arrange fields in it. I need move choice field "Termin od" beside Date&Time field named "Čas začatia", moreover how can I hide name of this choice field "Termin od" without hiding choices? If I use jQuery, it hides the field completely (Name and choices).

Got anybody some ideas of css or jQuery?

enter image description here

Thank you

도움이 되었습니까?

해결책

Considering that you are using Sharepoint list forms - Below Jquery code should move the choice field

Code for DispForm.aspx $("a[name='SPBookmark_Identifier']").closest("td").next("td").appendTo($("a[name='SPBookmark_Title']").closest("tr")); $("a[name='SPBookmark_Identifier']").closest("tr").hide();

  • Replace Identifier with the internal name of your Termin od field
  • Replace Title with the internal name of your Čas začatia field

Code for EditForm.aspx & NewForm.aspx

$(".ms-formtable").find("tr:nth-child(2) td:nth-child(2)").appendTo($(".ms-formtable").find("tr:nth-child(1)")[0]); $(".ms-formtable").find("tr:nth-child(2)").hide()

다른 팁

Create new list form by using Sharepoint Designer and edit form html without using additional scripts and styles.

Here is solution code:

<script language="javascript" src="https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/SiteAssets/code/jquery-3.0.0.min.js"></script> <script> $(document).ready(function () { $(".ms-formtable").find("tr:nth-child(4) td:nth-child(2)").appendTo($(".ms-formtable").find("tr:nth-child(1) td:nth-child(3)")[0]); $(".ms-formtable").find("tr:nth-child(6) td:nth-child(2)").appendTo($(".ms-formtable").find("tr:nth-child(1) td:nth-child(3)")[1]); $(".ms-formtable").find("tr:nth-child(4) td:nth-child(1)").hide(); $(".ms-formtable").find("tr:nth-child(6) td:nth-child(1)").hide(); }); </script>

Thanks a lot to HarryB.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top