
await sp.web.fields.getByTitle(&quot;My Field&quot;).setShowInDisplayForm(true);
// show field called 'My Field' in display form for list 'My List'
await sp.web.lists.getByTitle(&quot;My List&quot;).fields.getByTitle(&quot;My Field&quot;).setShowInDisplayForm(true);
</code></pre>
<h3 id="show-a-field-in-the-edit-form">Show a Field in the Edit Form<a class="headerlink" href="#show-a-field-in-the-edit-form" title="Permanent link">&para;</a></h3>
<p>Use the setShowInEditForm method to add a field to the edit 