Question

I have a Lookup column to another list but I need to display a "Blank" value or a "None" as the first item in the dropdown. The column must remain "Required". Does anyone have a JQuery example of how to do this?

Bismarck

Was it helpful?

Solution

Demo:

<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script>
$(function () {
      $("select[title='look']").prepend("<option selected>none</option>")

   })

</script>

Tip:on-premise is different from online.The title of required look up column is "columnName Required Field" in SPO,you need to change it.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top