1

I am using SharePoint Online and trying to make a column (My Column) invisible in the NewForm.aspx using jQuery (which I have no experience in). Here is the code I have tried by inserting into a Script Editor web part with no success.

Can anyone comment on how I might get this working?

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script>
$("nobr:contains('My Column')").closest('tr').hide();
</script>
0

1 Answer 1

5

I believe your code get execute first and after which the dom is rendering. You can wrap your code in document.ready.

$(document).ready(function(){
$("nobr:contains('My Column')").closest('tr').hide();
});
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.