SharePoint Formfield set Placeholder attribute

While using SharePoint Designer I haven’t found it possible to set the placeholder values, therefore a workaround for this is to use JQuery.

To do this, go to https://code.jquery.com/ and get the latest CDN

Then copy the script below, modifying the relevant sections

<script type=”text/javascript” src=”https://TENANT.sharepoint.com/sites/YourSharePointSiteCol/SiteAssets/CDN/jquery-3.3.1.min.js”></script>
<script>

$(document).ready(function(){
$(“input[Title=’COLUMN NAME’]”).attr(‘placeholder’, “PLACEHOLDER FOR YOUR COLUMN NAME”);
});

 

 

Leave a Reply