Domanda

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

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top