selection - Can't manipulate inputs in EditForm.aspx with jQuery -


i try manipulated “editform.aspx” of list in site collection (sharepoint 2013). want input fields hidden based on users permission level. realize this, added editor webpart standard form of editform.aspx following code:

<script src="https://test-teamshare.zeiss.org/minimal/05011/libs/jquery-latest.js"></script> <script src="https://test-teamshare.zeiss.org/minimal/05011/libs/jquery.spservices-2013.01.js"></script>  <script type="text/javascript">     _spbodyonloadfunctionnames.push("hideinputfields");      function hideinputfields() {         $().spservices({         operation: "getrolesandpermissionsforcurrentuser",         async: false,         completefunc: function(xdata, status) {             var userperm = $(xdata.responsexml).spfilternode("permissions").attr("value");             var userrole = $(xdata.responsexml).spfilternode("role").attr("name");               if(jquery(".ms-formbody").find(input[title='dokumentennummer'])) {                 alert("has found fiels");             }              if(userrole = "vollzugriff") {              }         }         });     } </script> 

unfortunately doesn’t (at least fully) work. part user permission works well, not able manipulate input fields.

what doing wrong? tried replace “document.ready()” “_spbodyonloadfunctionnames.push()” doesn’t help.

then read “minimal download strategy (mds)” don’t understand concept based on information have this.

can help?

thank much

benjamin

i think error in find use title, should use id. careful when id incudes '$'. use firebug see if (jquery(".ms-formbody").find(input[title='dokumentennummer'] returns anything.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -