0

I have hidden a sharepoint yes/no filed using jquery. When i am logged in as another user i want to directly disable the hidden field. Somehow unless i show it first , i am not able to disable it.

This works : this field is hidden with jquery

$("nobr:contains('Extend This Contract ?')").parent('h3').parent('td').parent('tr').show(); $("input[Title='Extend This Contract ?']").attr("disabled", "disabled");

This does not

$("input[Title='Extend This Contract ?']").attr("disabled", "disabled");

Any workarounds for this ? Thanks in advance.

1
  • Can you post a html snippet so we know the context? Commented Jun 8, 2016 at 8:52

1 Answer 1

1

Try using prop instead of attr:

$("input[Title='Extend This Contract ?']").prop("disabled", true);
Sign up to request clarification or add additional context in comments.

Comments

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.