Forum Discussion
NMenB
Sep 09, 2022Copper Contributor
NewForm vs EditForm
I have a newform.aspx with 3 fields showing and 12 fields hidden by going in the content type to hide them. How can I show all these hidden fields in editform.aspx? Thanks.
NanddeepNachan
Sep 11, 2022Learn Expert
Hi NMenB
You can use below PnP PowerShell on each of the field to achieve this.
Connect-PnPOnline <spo-site-url>
$ctx = Get-PnPContext
$field = Get-PnPField -Identity <field-name> -List <list-name>
$field.SetShowInNewForm($false)
$field.SetShowInEditForm($true)
$field.Update()
$ctx.ExecuteQuery()
NMenB
Sep 14, 2022Copper Contributor
Thank you for your reply. I will try this one out.